package com.hsc.yalebao.tabIndex;

import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.text.Editable;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.View.OnKeyListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationSet;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.PopupWindow.OnDismissListener;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.gson.Gson;
import com.hsc.yalebao.adapter.CaishuziGridViewAdapter;
import com.hsc.yalebao.adapter.DaxiaodanSGridViewAdapter;
import com.hsc.yalebao.adapter.GroupChatMsgViewAdpater;
import com.hsc.yalebao.adapter.KaijiangListAdapter;
import com.hsc.yalebao.adapter.TeshuWanFGridViewAdapter;
import com.hsc.yalebao.adapter.TouzhuViewPagerAdapter;
import com.hsc.yalebao.base.ActivityStack;
import com.hsc.yalebao.base.BaseActivity;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.base.MainActivity;
import com.hsc.yalebao.face.EmojiFragment;
import com.hsc.yalebao.face.FaceBean;
import com.hsc.yalebao.face.FaceEditText;
import com.hsc.yalebao.face.FaceFragment;
import com.hsc.yalebao.face.FaceUtil;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.http.RequestNet;
import com.hsc.yalebao.model.BaseDataObject;
import com.hsc.yalebao.model.ChatMsgEntity;
import com.hsc.yalebao.model.ChatMsgModel;
import com.hsc.yalebao.model.GetTotalInfoBean;
import com.hsc.yalebao.model.IssueBaseBean;
import com.hsc.yalebao.model.IssueBean;
import com.hsc.yalebao.model.IssueListBaseBean;
import com.hsc.yalebao.model.IssueListBean;
import com.hsc.yalebao.model.IssueTimeBean;
import com.hsc.yalebao.model.NobibiBaseModel;
import com.hsc.yalebao.model.NobibiBean;
import com.hsc.yalebao.model.PlayStyleBaseBean;
import com.hsc.yalebao.model.PlayStyleBean;
import com.hsc.yalebao.model.PreProfitAndLossMoneyBean;
import com.hsc.yalebao.model.RuleBaseBean;
import com.hsc.yalebao.model.RuleBean;
import com.hsc.yalebao.model.TouzhuBean;
import com.hsc.yalebao.model.UserBaseBean;
import com.hsc.yalebao.tabChongZhi.ChongzhiActivity2;
import com.hsc.yalebao.tabMine.JiResultActivity;
import com.hsc.yalebao.tabMine.WanFaActivity;
import com.hsc.yalebao.tools.DateUtil;
import com.hsc.yalebao.tools.SharedPreferencesUtil;
import com.hsc.yalebao.tools.SystemHelper;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.tools.Utility;
import com.hsc.yalebao.volley.ApiClientVolley;
import com.hsc.yalebao.weight.AlwaysMarqueeTextView;
import com.hsc.yalebao.weight.LogUtils;
import com.hsc.yalebao.weight.MyDialog1;
import com.hsc.yalebao.weight.MyDialogCancelAndOk;
import com.hsc.yalebao.weight.MyDialogForbidBibi;
import com.hsc.yalebao.weight.MyDialogForbidBibi.MyDialogListener;
import com.hsc.yalebao.weight.MyDialogYuECharge;
import com.hsc.yalebao.weight.MyOddsPopuWindow;
import com.hsc.yalebao.weight.NewMyOddsPopuWindow;
import com.hsc.yalebao.weight.OkAndCanleDialog;
import com.hsc.yalebao.weight.RollView;
import com.hsc.yalebao.weight.RollView.OnPreTextChangeListener;
import com.zhy.http.okhttp.callback.StringCallback;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import okhttp3.Call;
import org.jivesoftware.smack.ConnectionListener;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.filter.MessageTypeFilter;
import org.jivesoftware.smack.packet.Message.Type;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.util.StringUtils;

public class RoomPrimaryActivity extends BaseActivity
  implements View.OnClickListener
{
  public static final String HOST = AppConstants.IMIP;
  public static final int MSG_SENDREPEAT_CLICK = 3;
  public static final int MSG_TOUXIANG_CLICK = 2;
  public static final int MSG_TOUZHU_CLICK = 1;
  public static final int PORT = 5222;
  public static final String SERVICE = "gmail.com";
  String Odds = "";
  public String PASSWORD = "";
  private String TAG = "-RoomPrimaryActivity-";
  public String USERNAME = "";
  private final int XMPP_MAX_CONN_COUNT = 3;
  private float arr_x;
  private float arr_y;
  String banForbidReason = "";
  private String bodyStr = "";
  private Button btn_max_touzhu;
  private Button btn_min_touzhu;
  private Button btn_touzhu1;
  private CaishuziGridViewAdapter caishuziGridViewAdapter;
  private int caishuziPosition = 0;
  private Calendar calendar;
  private XMPPConnection connection;
  ConnectionListener connectionListener = new ConnectionListener()
  {
    public void connectionClosed()
    {
      LogUtils.e("connection", "connectionClosed()");
      try
      {
        if (RoomPrimaryActivity.this.connection != null)
          RoomPrimaryActivity.this.connection = null;
        return;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
    }

    public void connectionClosedOnError(Exception paramAnonymousException)
    {
      LogUtils.e("connection", "connectionClosedOnError聊天连接断开");
      if (RoomPrimaryActivity.this.xmppConnCount < 3)
      {
        RoomPrimaryActivity.this.connectToXmpp();
        RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
        localRoomPrimaryActivity.xmppConnCount = (1 + localRoomPrimaryActivity.xmppConnCount);
      }
      paramAnonymousException.getMessage().contains("Connection timed out");
    }

    public void reconnectingIn(int paramAnonymousInt)
    {
      LogUtils.i("connection", "reconnectingIn");
    }

    public void reconnectionFailed(Exception paramAnonymousException)
    {
      if (RoomPrimaryActivity.this.xmppConnCount < 3)
      {
        RoomPrimaryActivity.this.connectToXmpp();
        RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
        localRoomPrimaryActivity.xmppConnCount = (1 + localRoomPrimaryActivity.xmppConnCount);
      }
      LogUtils.e("connection", "reconnectionFailed");
    }

    public void reconnectionSuccessful()
    {
      RoomPrimaryActivity.this.xmppConnCount = 0;
      RoomPrimaryActivity.this.dismissLoadingDialog();
      LogUtils.i("connection", "reconnectionSuccessful");
    }
  };
  private View contentView;
  private Context context;
  String currentIssue = "";
  private TimerTask currentIssueTimerTask;
  private int currentItem = 0;
  private int daxiaoDSPosition = 0;
  private DaxiaodanSGridViewAdapter daxiaodanSGridViewAdapter;
  Handler delayHandler = new Handler();
  private MyDialogYuECharge dialogyuECharge;
  private String diyitiaojieguo;
  private String diyitiaoqihao;
  private EditText edit_jine;
  private FaceEditText edit_shuru;
  private Handler emojiHandler = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      String str = (String)paramAnonymousMessage.obj;
      RoomPrimaryActivity.this.sendMsg(str);
    }
  };
  private List<EmojiFragment> emojifragments;
  private View emptyView;
  private Handler faceHandler = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      String str = (String)paramAnonymousMessage.obj;
      if (str.equals("[DELETE_ICON]"))
      {
        RoomPrimaryActivity.this.deleOneString();
        return;
      }
      int i = RoomPrimaryActivity.this.edit_shuru.getSelectionStart();
      Editable localEditable = RoomPrimaryActivity.this.edit_shuru.getText();
      localEditable.insert(i, str);
      int j = i + str.length();
      RoomPrimaryActivity.this.edit_shuru.setText(localEditable);
      RoomPrimaryActivity.this.edit_shuru.setSelection(j);
    }
  };
  private boolean fengpanisShowing = false;
  private List<FaceFragment> fragments;
  OkAndCanleDialog gentouDialog;
  private Handler getsystemmsg = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
        return;
      case 0:
      }
      RoomPrimaryActivity.this.tv_jinji_tongzhi.setVisibility(0);
      if (RoomPrimaryActivity.this.systemmag.length() < 22)
        RoomPrimaryActivity.this.tv_jinji_tongzhi.setText(RoomPrimaryActivity.this.systemmag + "     " + RoomPrimaryActivity.this.systemmag + "     " + RoomPrimaryActivity.this.systemmag);
      while (true)
      {
        RoomPrimaryActivity.this.delayed();
        return;
        RoomPrimaryActivity.this.tv_jinji_tongzhi.setText(RoomPrimaryActivity.this.systemmag);
      }
    }
  };
  private ArrayList<ChatMsgEntity> groupData;
  private GroupChatMsgViewAdpater groupchatMsgViewAdpater;
  private String guid = "";
  private GridView gv_caishuzi;
  private GridView gv_daxiaodans;
  private GridView gv_teshuwanf;
  private Handler handler120Second = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
      case 0:
      }
      do
      {
        return;
        RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
        localRoomPrimaryActivity.twoMinutes = (-5 + localRoomPrimaryActivity.twoMinutes);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "twoMinutes剩余时间:" + RoomPrimaryActivity.this.twoMinutes);
        if (RoomPrimaryActivity.this.twoMinutes >= 0)
          break;
        RoomPrimaryActivity.this.twoMinutes = 0;
      }
      while (RoomPrimaryActivity.this.twoMinutesTimerTask == null);
      RoomPrimaryActivity.this.twoMinutesTimerTask.cancel();
      LogUtils.e(RoomPrimaryActivity.this.TAG, "取消两分钟任务：剩余时间" + RoomPrimaryActivity.this.twoMinutes);
      RoomPrimaryActivity.this.twoMinutesTimerTask = null;
      return;
      RoomPrimaryActivity.this.getPreIssue();
      LogUtils.i(RoomPrimaryActivity.this.TAG, "获取上一期");
    }
  };
  private Handler handler30Second = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
      case 0:
      }
      do
      {
        return;
        RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
        localRoomPrimaryActivity.thirtySecond = (-1 + localRoomPrimaryActivity.thirtySecond);
        if (RoomPrimaryActivity.this.thirtySecond % 15 == 0)
          LogUtils.i(RoomPrimaryActivity.this.TAG, "三十秒任务执行，剩余时间====" + RoomPrimaryActivity.this.thirtySecond);
        if (RoomPrimaryActivity.this.thirtySecond < 0)
        {
          RoomPrimaryActivity.this.thirtySecond = 0;
          if (RoomPrimaryActivity.this.thirtySecondTimerTask != null)
          {
            RoomPrimaryActivity.this.thirtySecondTimerTask.cancel();
            RoomPrimaryActivity.this.thirtySecondTimerTask = null;
            LogUtils.e(RoomPrimaryActivity.this.TAG, "时间到：取消30秒任务====剩余时间" + RoomPrimaryActivity.this.thirtySecond);
          }
          LogUtils.i(RoomPrimaryActivity.this.TAG, "thirtySecond = 0,获取当前期");
          RoomPrimaryActivity.this.jianadatouzhuisShowing = false;
          RoomPrimaryActivity.this.touzhuisShowing = false;
          RoomPrimaryActivity.this.getCurrentIssue();
          RoomPrimaryActivity.this.shangqijieguoisShowing = true;
          RoomPrimaryActivity.this.getPreIssue();
          return;
        }
      }
      while (RoomPrimaryActivity.this.thirtySecond <= 0);
      RoomPrimaryActivity.this.txt_time_left.setText("封盘中");
      RoomPrimaryActivity.this.isKaijianging = true;
    }
  };
  private Handler handlerCurrentIssue = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
      case 0:
      }
      do
      {
        return;
        RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
        localRoomPrimaryActivity.timeLeft = (-1 + localRoomPrimaryActivity.timeLeft);
        if (RoomPrimaryActivity.this.timeLeft % 100 == 0)
          LogUtils.i(RoomPrimaryActivity.this.TAG, "每秒钟定时任务:剩余时间" + RoomPrimaryActivity.this.timeLeft);
        if ((RoomPrimaryActivity.this.timeLeft != 0) && (RoomPrimaryActivity.this.timeLeft >= 0))
          break;
        RoomPrimaryActivity.this.timeLeft = 0;
        RoomPrimaryActivity.this.shangqijieguoisShowing = true;
        String str1 = "【" + RoomPrimaryActivity.this.currentIssue + "期】 已封盘,下注结果以系统开奖为标准，如有异议，请及时联系客服。";
        if (("1".equals(RoomPrimaryActivity.this.lotteryid)) || ("3".equals(RoomPrimaryActivity.this.lotteryid)))
        {
          if (!RoomPrimaryActivity.this.fengpanisShowing)
            RoomPrimaryActivity.this.sendTouzhuRemindMsg(str1);
          RoomPrimaryActivity.this.fengpanisShowing = true;
        }
        if (RoomPrimaryActivity.this.thirtySecondTimerTask != null)
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "时间到：取消30秒定时====剩余时间" + RoomPrimaryActivity.this.thirtySecond);
          RoomPrimaryActivity.this.thirtySecondTimerTask.cancel();
          RoomPrimaryActivity.this.thirtySecondTimerTask = null;
        }
        LogUtils.e(RoomPrimaryActivity.this.TAG, "创建30秒定时任务：剩余时间" + RoomPrimaryActivity.this.thirtySecond);
        RoomPrimaryActivity.this.thirtySecondTimerTask = new RoomPrimaryActivity.ThirtySecondTimerTask(RoomPrimaryActivity.this);
        if (RoomPrimaryActivity.this.timer != null)
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "执行30秒定时任务：剩余时间" + RoomPrimaryActivity.this.thirtySecond);
          RoomPrimaryActivity.this.timer.scheduleAtFixedRate(RoomPrimaryActivity.this.thirtySecondTimerTask, 0L, 1000L);
        }
      }
      while (RoomPrimaryActivity.this.currentIssueTimerTask == null);
      RoomPrimaryActivity.this.currentIssueTimerTask.cancel();
      LogUtils.e(RoomPrimaryActivity.this.TAG, "取消获取当前期任务：剩余时间" + RoomPrimaryActivity.this.timeLeft);
      RoomPrimaryActivity.this.currentIssueTimerTask = null;
      return;
      String str2 = DateUtil.getStringfromInt(RoomPrimaryActivity.this.timeLeft);
      RoomPrimaryActivity.this.txt_time_left.setText(str2);
      RoomPrimaryActivity.this.isKaijianging = false;
      RoomPrimaryActivity.this.fengpanisShowing = false;
      if (("1".equals(RoomPrimaryActivity.this.lotteryid)) || ("2".equals(RoomPrimaryActivity.this.lotteryid)))
      {
        if ((RoomPrimaryActivity.this.timeLeft == 255) && (RoomPrimaryActivity.this.twoMinutesTimerTask == null))
        {
          RoomPrimaryActivity.this.twoMinutesTimerTask = new RoomPrimaryActivity.TwoMinutesTimerTask(RoomPrimaryActivity.this);
          LogUtils.e(RoomPrimaryActivity.this.TAG, "创建一个两分半的任务");
          RoomPrimaryActivity.this.twoMinutes = 120;
          if (RoomPrimaryActivity.this.timer != null)
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "执行两分半任务");
            RoomPrimaryActivity.this.timer.scheduleAtFixedRate(RoomPrimaryActivity.this.twoMinutesTimerTask, 0L, 5000L);
          }
        }
        label616: if (RoomPrimaryActivity.this.timeLeft != 60)
          break label790;
        if (RoomPrimaryActivity.this.connection != null)
          break label792;
        RoomPrimaryActivity.this.connectToXmpp();
      }
      while (true)
      {
        String str3 = "【" + RoomPrimaryActivity.this.currentIssue + "期】 距封盘还有60秒，请抓紧时间下注。";
        RoomPrimaryActivity.this.sendTouzhuRemindMsg(str3);
        return;
        if ((RoomPrimaryActivity.this.timeLeft != 190) || (RoomPrimaryActivity.this.twoMinutesTimerTask != null))
          break label616;
        RoomPrimaryActivity.this.twoMinutesTimerTask = new RoomPrimaryActivity.TwoMinutesTimerTask(RoomPrimaryActivity.this);
        LogUtils.e(RoomPrimaryActivity.this.TAG, "创建一个两分半的任务");
        RoomPrimaryActivity.this.twoMinutes = 120;
        if (RoomPrimaryActivity.this.timer == null)
          break label616;
        LogUtils.e(RoomPrimaryActivity.this.TAG, "执行两分半任务");
        RoomPrimaryActivity.this.timer.scheduleAtFixedRate(RoomPrimaryActivity.this.twoMinutesTimerTask, 0L, 5000L);
        break label616;
        label790: break;
        label792: if (!RoomPrimaryActivity.this.connection.isConnected())
          RoomPrimaryActivity.this.connectToXmpp();
      }
    }
  };
  private Handler handlerTest = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
      case 0:
      }
      while (true)
      {
        RoomPrimaryActivity.this.handlerTest.sendEmptyMessageDelayed(0, 500L);
        return;
        RoomPrimaryActivity.this.sendMsg();
      }
    }
  };
  private int i = 0;
  private ImageView img;
  private ImageView img_biaoqing;
  private ImageView img_emoji;
  private ImageView img_face;
  private ImageView img_fasong;
  private ImageView img_touzhu;
  private ImageView img_xiala;
  boolean isAnimRunning;
  private boolean isDebug = false;
  private boolean isInDate = true;
  private boolean isKaijianging = false;
  private boolean isKeyboardShowing = false;
  boolean isRepeatMsg = false;
  private boolean isScrollLastRoll;
  private boolean isTopTen = false;
  private ArrayList<IssueListBaseBean> issueListBaseBeanList = new ArrayList();
  private ChatMsgEntity itemChatMsgEntity;
  private int itemPosition = -1;
  private TextView iv_arrow;
  private ImageView iv_title_right;
  private boolean jianadatouzhuisShowing = false;
  private KaijiangListAdapter kaijiangListAdapter;
  private int keyHeight;
  private RadioGroup layoutDotsFace;
  private LinearLayout lin_0;
  private LinearLayout lin_face;
  private LinearLayout lin_nearly_ten;
  private RelativeLayout lin_user_amount;
  private ListView list_group_chat;
  private ListView list_kaijiang;
  private LinearLayout ll_jiezhi;
  private LinearLayout ll_paoma;
  private String lotteryid;
  private ApiClientVolley mApiClientVolley;
  private int mConnectTime = 60000;
  private int mCurrentPager = 0;
  private Handler mDataHandler = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      Bundle localBundle = paramAnonymousMessage.getData();
      if (localBundle != null)
        switch (paramAnonymousMessage.what)
        {
        default:
        case 1:
        }
      while (true)
      {
        super.handleMessage(paramAnonymousMessage);
        return;
        String str = localBundle.getString("data");
        Map localMap = (Map)paramAnonymousMessage.obj;
        RoomPrimaryActivity.this.dealData(str, localMap);
      }
    }
  };
  private boolean mIsGenTou = false;
  private boolean mIsNormalTou = false;
  private boolean mIsRunXmpp = true;
  private Handler mItemClickHandler = new Handler()
  {
    public void handleMessage(android.os.Message paramAnonymousMessage)
    {
      switch (paramAnonymousMessage.what)
      {
      default:
      case 1:
      case 2:
      case 3:
      }
      do
      {
        return;
        RoomPrimaryActivity.this.itemPosition = ((Integer)paramAnonymousMessage.obj).intValue();
        RoomPrimaryActivity.this.gentou(RoomPrimaryActivity.this.itemPosition);
        return;
        RoomPrimaryActivity.this.itemPosition = ((Integer)paramAnonymousMessage.obj).intValue();
        RoomPrimaryActivity.this.myDialogForbidBibi.show();
        if ((RoomPrimaryActivity.this.groupData != null) && (RoomPrimaryActivity.this.groupData.size() != 0))
        {
          RoomPrimaryActivity.this.itemChatMsgEntity = ((ChatMsgEntity)RoomPrimaryActivity.this.groupData.get(RoomPrimaryActivity.this.itemPosition));
          if (RoomPrimaryActivity.this.myDialogForbidBibi != null)
          {
            RoomPrimaryActivity.this.myDialogForbidBibi.setUserData(RoomPrimaryActivity.this.itemChatMsgEntity);
            return;
          }
          LogUtils.e(RoomPrimaryActivity.this.TAG, "myDialogForbidBibi == null");
          return;
        }
        LogUtils.e(RoomPrimaryActivity.this.TAG, "mItemClickHandler,点击的用户是:" + RoomPrimaryActivity.this.itemChatMsgEntity.getNickname());
        return;
        RoomPrimaryActivity.this.itemPosition = ((Integer)paramAnonymousMessage.obj).intValue();
      }
      while ((RoomPrimaryActivity.this.groupData == null) || (RoomPrimaryActivity.this.groupData.size() == 0));
      RoomPrimaryActivity.this.itemChatMsgEntity = ((ChatMsgEntity)RoomPrimaryActivity.this.groupData.get(RoomPrimaryActivity.this.itemPosition));
      RoomPrimaryActivity.this.sendMsgRePeat(RoomPrimaryActivity.this.itemChatMsgEntity);
    }
  };
  int mNumber = 2;
  private String mOdds;
  private int mPlayStyleId;
  private PreProfitAndLossMoneyBean mPreProfitAndLossMoneyBean;
  private String mRoleId;
  private String mRoleName;
  String[] mTitles = { "VIP房间1", "VIP房间2", "VIP房间3" };
  private String mTouzhuJine;
  final Handler mXmppHandler = new Handler();
  Runnable mXmppThread = new Runnable()
  {
    public void run()
    {
      RoomPrimaryActivity.this.mXmppHandler.removeCallbacks(RoomPrimaryActivity.this.mXmppThread);
      RoomPrimaryActivity.this.mXmppHandler.postDelayed(RoomPrimaryActivity.this.mXmppThread, RoomPrimaryActivity.this.mConnectTime);
      if (RoomPrimaryActivity.this.mIsRunXmpp)
      {
        if (RoomPrimaryActivity.this.connection != null)
          break label71;
        RoomPrimaryActivity.this.connectToXmpp();
      }
      label71: 
      while (RoomPrimaryActivity.this.connection.isConnected())
        return;
      RoomPrimaryActivity.this.connectToXmpp();
    }
  };
  private int memberId;
  private double minsinglebe;
  private MyDialog1 myDialog1;
  private MyDialogCancelAndOk myDialogCancelAndOk;
  private MyDialogForbidBibi myDialogForbidBibi;
  private String myGrade = "1";
  private MyOddsPopuWindow myOddsPopuWindow;
  private NewMyOddsPopuWindow newMyOddsPopuWindow;
  private String nickName = "";
  View.OnClickListener onClickListener = new View.OnClickListener()
  {
    public void onClick(View paramAnonymousView)
    {
      switch (paramAnonymousView.getId())
      {
      case 2131099700:
      case 2131099701:
      case 2131099703:
      default:
        return;
      case 2131099699:
        CustomApplication.app.finishActivity(RoomPrimaryActivity.this);
        return;
      case 2131099704:
        RoomPrimaryActivity.this.showPopupWindowMenu();
        RoomPrimaryActivity.this.iv_title_right.setImageResource(2130837627);
        return;
      case 2131099702:
      }
      RoomPrimaryActivity.this.disConnectionToXmpp();
      RoomPrimaryActivity.this.startActivity(new Intent(RoomPrimaryActivity.this, CustomServiceActivity.class));
    }
  };
  View.OnFocusChangeListener onFocusChangeListener = new View.OnFocusChangeListener()
  {
    public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
    {
      if (!paramAnonymousBoolean)
      {
        RoomPrimaryActivity.this.closeWindowSoftInput(paramAnonymousView);
        RoomPrimaryActivity.this.lin_face.setVisibility(8);
      }
    }
  };
  AdapterView.OnItemClickListener onItemClickListenerCaishuzi = new AdapterView.OnItemClickListener()
  {
    public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
    {
      try
      {
        RoomPrimaryActivity.this.caishuziPosition = paramAnonymousInt;
        RoomPrimaryActivity.this.caishuziGridViewAdapter.setSelection(paramAnonymousInt);
        RoomPrimaryActivity.this.caishuziGridViewAdapter.notifyDataSetChanged();
        RuleBaseBean localRuleBaseBean = (RuleBaseBean)((Adapter)paramAnonymousAdapterView.getAdapter()).getItem(paramAnonymousInt);
        if (localRuleBaseBean != null)
        {
          String str = localRuleBaseBean.getWinNumber();
          RoomPrimaryActivity.this.tv_introduce_cai.setText("中奖号码：" + str);
        }
        return;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
    }
  };
  AdapterView.OnItemClickListener onItemClickListenerDaxiaoSD = new AdapterView.OnItemClickListener()
  {
    public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
    {
      try
      {
        RoomPrimaryActivity.this.daxiaoDSPosition = paramAnonymousInt;
        RoomPrimaryActivity.this.daxiaodanSGridViewAdapter.setSelection(paramAnonymousInt);
        RoomPrimaryActivity.this.daxiaodanSGridViewAdapter.notifyDataSetChanged();
        RuleBaseBean localRuleBaseBean = (RuleBaseBean)((Adapter)paramAnonymousAdapterView.getAdapter()).getItem(paramAnonymousInt);
        if (localRuleBaseBean != null)
          RoomPrimaryActivity.this.tv_introduce_daxiao.setText("中奖和值：" + localRuleBaseBean.getWinNumber());
        return;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
    }
  };
  AdapterView.OnItemClickListener onItemClickListenerTeShuWF = new AdapterView.OnItemClickListener()
  {
    public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
    {
      String str;
      try
      {
        RoomPrimaryActivity.this.teshuWFPosition = paramAnonymousInt;
        RoomPrimaryActivity.this.teshuWanFGridViewAdapter.setSelection(paramAnonymousInt);
        RoomPrimaryActivity.this.teshuWanFGridViewAdapter.notifyDataSetChanged();
        RuleBaseBean localRuleBaseBean = (RuleBaseBean)((Adapter)paramAnonymousAdapterView.getAdapter()).getItem(paramAnonymousInt);
        if (localRuleBaseBean == null)
          return;
        RoomPrimaryActivity.this.roleName = localRuleBaseBean.getName();
        str = localRuleBaseBean.getWinNumber();
        if ("红".equals(RoomPrimaryActivity.this.roleName))
        {
          RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str);
          return;
        }
        if ("绿".equals(RoomPrimaryActivity.this.roleName))
        {
          RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str);
          return;
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      if ("蓝".equals(RoomPrimaryActivity.this.roleName))
      {
        RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str);
        return;
      }
      if ("豹子".equals(RoomPrimaryActivity.this.roleName))
      {
        RoomPrimaryActivity.this.tv_introduce_teshu.setText("三个数字一致即为中奖");
        System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + RoomPrimaryActivity.this.roleName);
      }
    }
  };
  View.OnKeyListener onKey = new View.OnKeyListener()
  {
    public boolean onKey(View paramAnonymousView, int paramAnonymousInt, KeyEvent paramAnonymousKeyEvent)
    {
      if ((paramAnonymousInt == 66) && (paramAnonymousKeyEvent.getAction() == 0))
      {
        RoomPrimaryActivity.this.sendMsg();
        return true;
      }
      return false;
    }
  };
  AbsListView.OnScrollListener onScrollListener = new AbsListView.OnScrollListener()
  {
    public void onScroll(AbsListView paramAnonymousAbsListView, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3)
    {
      if ((paramAnonymousInt1 + paramAnonymousInt2 == paramAnonymousInt3) && (paramAnonymousInt3 > 0))
      {
        RoomPrimaryActivity.this.isScrollLastRoll = true;
        return;
      }
      RoomPrimaryActivity.this.isScrollLastRoll = false;
    }

    public void onScrollStateChanged(AbsListView paramAnonymousAbsListView, int paramAnonymousInt)
    {
      switch (paramAnonymousInt)
      {
      default:
      case 1:
      case 0:
      }
      do
      {
        return;
        try
        {
          ((InputMethodManager)RoomPrimaryActivity.this.getSystemService("input_method")).hideSoftInputFromWindow(RoomPrimaryActivity.this.edit_shuru.getWindowToken(), 0);
          RoomPrimaryActivity.this.lin_face.setVisibility(8);
          return;
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
          return;
        }
        LogUtils.d(RoomPrimaryActivity.this.TAG, "listView不滚动时");
      }
      while (paramAnonymousAbsListView.getLastVisiblePosition() != -1 + paramAnonymousAbsListView.getCount());
      LogUtils.i(RoomPrimaryActivity.this.TAG, "listView 滚动到了底部");
    }
  };
  PacketListener packetListener = new PacketListener()
  {
    public void processPacket(Packet paramAnonymousPacket)
    {
      if (RoomPrimaryActivity.this.connection == null)
        RoomPrimaryActivity.this.connectToXmpp();
      org.jivesoftware.smack.packet.Message localMessage;
      String str1;
      String str4;
      while (RoomPrimaryActivity.this.connection.isConnected())
      {
        localMessage = (org.jivesoftware.smack.packet.Message)paramAnonymousPacket;
        str1 = localMessage.getBody();
        String str2 = StringUtils.parseBareAddress(localMessage.getFrom());
        String str3 = localMessage.getRoomid();
        LogUtils.i(RoomPrimaryActivity.this.TAG, "Text Recieved " + str1 + " from " + str2);
        str4 = localMessage.getMessagedirect();
        LogUtils.e(RoomPrimaryActivity.this.TAG, "messageDirect(1群聊 2客服):" + str4);
        if (RoomPrimaryActivity.this.roomId.equals(str3))
          break;
        LogUtils.e(RoomPrimaryActivity.this.TAG, "不是本房间的消息");
        return;
      }
      RoomPrimaryActivity.this.connectToXmpp();
      return;
      int i = -1;
      String str5 = localMessage.getMemberid();
      String str6;
      ChatMsgEntity localChatMsgEntity;
      String str11;
      try
      {
        int j = Integer.parseInt(str5);
        i = j;
        str6 = localMessage.getUsername();
        str7 = localMessage.getNickname();
        str8 = localMessage.getPicurl();
        str9 = localMessage.getSendtime();
        str10 = localMessage.getUsergrade();
        if (!"1".equals(str4))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "非群聊");
          return;
        }
      }
      catch (NumberFormatException localNumberFormatException)
      {
        String str7;
        String str8;
        String str9;
        String str10;
        while (true)
          localNumberFormatException.printStackTrace();
        LogUtils.i(RoomPrimaryActivity.this.TAG, "收到消息body：" + str1);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "收到消息memberIdX：" + str5);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "当前用户memberId：" + RoomPrimaryActivity.this.memberId);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "收到消息nickName：" + str7);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "收到消息userName：" + str6);
        LogUtils.i(RoomPrimaryActivity.this.TAG, "收到消息等级：" + str10);
        localChatMsgEntity = new ChatMsgEntity();
        localChatMsgEntity.setBody(str1);
        localChatMsgEntity.setMemberid(i);
        localChatMsgEntity.setNickname(str7);
        localChatMsgEntity.setUser_name(str6);
        localChatMsgEntity.setPicurl(str8);
        localChatMsgEntity.setSendtime(str9);
        localChatMsgEntity.setComMsg(0);
        localChatMsgEntity.setUsergrade(str10);
        str11 = localMessage.getMessagetype();
        LogUtils.e(RoomPrimaryActivity.this.TAG, "messageType:" + str11);
        if (!"1".equals(str11))
          break label563;
      }
      LogUtils.i(RoomPrimaryActivity.this.TAG, " 聊天消息----------------------------");
      localChatMsgEntity.setMessagetype("1");
      while (true)
      {
        RoomPrimaryActivity.this.groupData.add(localChatMsgEntity);
        RoomPrimaryActivity.this.isRepeatMsg = false;
        RoomPrimaryActivity.this.refeshChatListView();
        return;
        label563: if ("2".equals(str11))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, " 投注的消息");
          localChatMsgEntity.setMessagetype("2");
        }
        else if ("3".equals(str11))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "gif消息");
          localChatMsgEntity.setMessagetype("3");
        }
        else if ("5".equals(str11))
        {
          LogUtils.i(RoomPrimaryActivity.this.TAG, " 系统消息");
          localChatMsgEntity.setMessagetype("5");
          if (i == RoomPrimaryActivity.this.memberId)
          {
            if ("banuser".equals(str6))
            {
              RoomPrimaryActivity localRoomPrimaryActivity2 = RoomPrimaryActivity.this;
              Runnable local1 = new Runnable()
              {
                public void run()
                {
                  RoomPrimaryActivity.this.ShowFengjinDialog();
                }
              };
              localRoomPrimaryActivity2.runOnUiThread(local1);
            }
            RoomPrimaryActivity localRoomPrimaryActivity1 = RoomPrimaryActivity.this;
            Runnable local2 = new Runnable()
            {
              public void run()
              {
                UiUtil.showToast(RoomPrimaryActivity.this.context, "您已被禁言");
                RoomPrimaryActivity.this.userNoBibiState = 1;
              }
            };
            localRoomPrimaryActivity1.runOnUiThread(local2);
          }
        }
        else if ("9".equals(str11))
        {
          localChatMsgEntity.setMessagetype("9");
          LogUtils.i(RoomPrimaryActivity.this.TAG, " 公告---------" + localChatMsgEntity.getBody());
          RoomPrimaryActivity.this.systemmag = localChatMsgEntity.getBody();
          RoomPrimaryActivity.this.getsystemmsg.sendEmptyMessageDelayed(0, 0L);
        }
        else if ("10".equals(str11))
        {
          localChatMsgEntity.setMessagetype("10");
        }
        else if ("11".equals(str11))
        {
          localChatMsgEntity.setMessagetype("11");
        }
      }
    }
  };
  int page = 1;
  private TouzhuViewPagerAdapter pagerAdapter;
  private String parentid;
  private ArrayList<PlayStyleBaseBean> playStyleBaseBeans = new ArrayList();
  int playStyleId = -1;
  private View popViewRight;
  private PopupWindow popupWindow;
  private PopupWindow popupWindowKaijiang;
  private PopupWindow popupWindowTouzhu;
  private String preIssue;
  private MyReceiver receiverNet = null;
  Runnable refeshRunnable = new Runnable()
  {
    public void run()
    {
      RoomPrimaryActivity.this.setAdapterDatas();
    }
  };
  private RelativeLayout rel_content;
  private RelativeLayout rel_root;
  String roleId = "";
  String roleName = "";
  String roomId = "";
  String roomName = "";
  private int room_level;
  public ArrayList<RuleBaseBean> ruleBaseBeansCai;
  private ArrayList<RuleBaseBean> ruleBaseBeansDa;
  public ArrayList<RuleBaseBean> ruleBaseBeansTe;
  private int screenHeight;
  private int screenWidth;
  private Date serverDate;
  private boolean shangqijieguoisShowing;
  private double singlebet;
  protected int start_X;
  protected int start_Y;
  private double sumbet;
  private String systemmag;
  private int teshuWFPosition = 0;
  private TeshuWanFGridViewAdapter teshuWanFGridViewAdapter;
  int thirtySecond = 30;
  private TimerTask thirtySecondTimerTask;
  int timeLeft;
  private Timer timer = new Timer();
  private boolean tingshouisShowing = false;
  String touzhuJine = "";
  private int touzhuStyle = 0;
  private boolean touzhuisShowing = false;
  private TextView tv_begin_time;
  private TextView tv_earn_money;
  private TextView tv_game_time;
  private TextView tv_introduce_cai;
  private TextView tv_introduce_daxiao;
  private TextView tv_introduce_teshu;
  private AlwaysMarqueeTextView tv_jinji_tongzhi;
  private TextView tv_tishi;
  RollView tv_title;
  int twoMinutes = 120;
  private TimerTask twoMinutesTimerTask;
  private TextView txt_current_issue;
  private TextView txt_money_left;
  private TextView txt_pre_issue;
  private TextView txt_pre_issue_no;
  private TextView txt_time_left;
  private String userAmount = "0";
  private String userLogo = "";
  private String userNoBibiEndTime;
  private int userNoBibiState;
  private String userNoBibireason;
  View viewCaiShuZ;
  View viewDaXiaoDanS;
  private View viewNearlyTen;
  private ViewPager viewPagerFace;
  View viewTeShuWanF;
  private View viewTouzhu;
  private View view_title;
  private ArrayList<View> views = new ArrayList();
  private ViewPager vp_emoji;
  private WindowManager windowManager;
  int xmppConnCount;

  private void Set6sdismiss()
  {
    try
    {
      new Handler().postDelayed(new Runnable()
      {
        public void run()
        {
          RoomPrimaryActivity.this.dismissLoadingDialog();
        }
      }
      , 6000L);
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  private RadioButton createRadioButton()
  {
    RadioButton localRadioButton = new RadioButton(this);
    RadioGroup.LayoutParams localLayoutParams = new RadioGroup.LayoutParams(20, 20);
    localLayoutParams.rightMargin = 5;
    localRadioButton.setLayoutParams(localLayoutParams);
    localRadioButton.setButtonDrawable(new BitmapDrawable());
    localRadioButton.setBackgroundResource(2130838224);
    return localRadioButton;
  }

  private void dealData(String paramString, Map<String, String> paramMap)
  {
    this.gentouDialog.dismiss();
    setTouzhuBut();
    if ((this.popupWindowTouzhu != null) && (this.popupWindowTouzhu.isShowing()))
      this.popupWindowTouzhu.dismiss();
    closeWindowSoftInput(this.edit_jine);
    LogUtils.d(this.TAG, "result:" + paramString);
    if ((paramString == null) || ("".equals(paramString)))
    {
      LogUtils.e(this.TAG, "result:" + paramString);
      return;
    }
    Gson localGson = new Gson();
    TouzhuBean localTouzhuBean;
    try
    {
      localTouzhuBean = (TouzhuBean)localGson.fromJson(paramString, TouzhuBean.class);
      if (localTouzhuBean == null)
      {
        LogUtils.e(this.TAG, "getCurrSecond-touzhuBean == null，获取失败");
        return;
      }
    }
    catch (Exception localException)
    {
      while (true)
      {
        localException.printStackTrace();
        localTouzhuBean = null;
      }
      switch (localTouzhuBean.getFlag())
      {
      default:
        return;
      case -4:
        activityStack.backToMain(MainActivity.class, this.context);
        return;
      case 1:
        LogUtils.d(this.TAG, "投注成功");
        if (localTouzhuBean.getLeftmoney() != null)
        {
          String str9 = localTouzhuBean.getLeftmoney();
          LogUtils.d("获取成功", "投注接口返回的余额" + str9);
          this.userAmount = str9;
        }
        try
        {
          double d2 = Double.parseDouble(this.userAmount);
          this.txt_money_left.setText(UiUtil.savePoint(d2, 2) + "元宝");
          String str2 = (String)paramMap.get("issue");
          String str3 = (String)paramMap.get("rolename");
          String str4 = (String)paramMap.get("money");
          String str5 = (String)paramMap.get("playid");
          String str6 = (String)paramMap.get("Odds");
          String str7 = (String)paramMap.get("ruleid");
          String str8 = str2 + "@" + str3 + "@" + str4 + "@" + str5 + "@" + str6 + "@" + str7 + "@" + this.USERNAME;
          LogUtils.i(this.TAG, "sendTouzhuToXmpp()-body:" + str8);
          ChatMsgEntity localChatMsgEntity = new ChatMsgEntity();
          localChatMsgEntity.setBody(str8);
          localChatMsgEntity.setMessagetype("2");
          localChatMsgEntity.setMemberid(this.memberId);
          localChatMsgEntity.setComMsg(1);
          localChatMsgEntity.setNickname(this.nickName);
          localChatMsgEntity.setUsergrade(this.myGrade);
          localChatMsgEntity.setPicurl(this.userLogo);
          localChatMsgEntity.setSendtime(DateUtil.getNowTime());
          localChatMsgEntity.setComMsg(1);
          this.groupData.add(localChatMsgEntity);
          this.isRepeatMsg = false;
          localChatMsgEntity.setIsSendMsgRepeat(1);
          refeshChatListView();
          return;
        }
        catch (NumberFormatException localNumberFormatException2)
        {
          while (true)
            localNumberFormatException2.printStackTrace();
        }
      case 0:
        if (localTouzhuBean.getLeftmoney() != null)
        {
          String str1 = localTouzhuBean.getLeftmoney();
          LogUtils.d("获取成功", "投注接口返回的余额" + str1);
          this.userAmount = str1;
        }
        try
        {
          double d1 = Double.parseDouble(this.userAmount);
          this.txt_money_left.setText(UiUtil.savePoint(d1, 2) + "元宝");
          this.myDialog1.setMessage(localTouzhuBean.getMsg());
          this.myDialog1.show();
          Button localButton2 = this.myDialog1.btn_confirm;
          View.OnClickListener local85 = new View.OnClickListener()
          {
            public void onClick(View paramAnonymousView)
            {
              if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
                RoomPrimaryActivity.this.myDialog1.dismiss();
            }
          };
          localButton2.setOnClickListener(local85);
          return;
        }
        catch (NumberFormatException localNumberFormatException1)
        {
          while (true)
            localNumberFormatException1.printStackTrace();
        }
      case -2:
        showDownWireDialog();
        return;
      case -3:
      case 100:
      }
    }
    ShowFengjinDialog();
    return;
    this.myDialog1.setMessage(localTouzhuBean.getMsg());
    this.myDialog1.show();
    Button localButton1 = this.myDialog1.btn_confirm;
    View.OnClickListener local86 = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
          RoomPrimaryActivity.this.myDialog1.dismiss();
      }
    };
    localButton1.setOnClickListener(local86);
  }

  private void dealPreDate(IssueBean paramIssueBean)
  {
    if (paramIssueBean == null)
    {
      getPreIssue();
      LogUtils.e(this.TAG, "获取失败");
    }
    while (true)
    {
      return;
      if (paramIssueBean.getFlag() == -4)
      {
        activityStack.backToMain(MainActivity.class, this.context);
        return;
      }
      if (paramIssueBean.getFlag() != 0)
      {
        if (paramIssueBean.getFlag() == -2)
        {
          showDownWireDialog();
          return;
        }
        if (paramIssueBean.getFlag() == -3)
        {
          ShowFengjinDialog();
          return;
        }
        IssueBaseBean localIssueBaseBean = paramIssueBean.getResult();
        String str1 = "";
        if ((paramIssueBean.getFlag() == 1) && (localIssueBaseBean != null))
        {
          String str2 = paramIssueBean.getRealWin();
          this.preIssue = localIssueBaseBean.getIssue();
          String str3 = localIssueBaseBean.getResult_Time();
          LogUtils.i(this.TAG, "resultTime:" + str3);
          if ((str3 != null) && (!"".equals(str3)))
          {
            str1 = str3.substring(11, 16);
            LogUtils.i(this.TAG, "resultTIME:" + str1);
          }
          String str4 = localIssueBaseBean.getRealResult().replace(",", " + ");
          String str5 = localIssueBaseBean.getSumValue();
          int j = localIssueBaseBean.getStatus();
          String str6 = this.txt_pre_issue.getText().toString();
          if (!this.preIssue.equals(str6))
          {
            this.txt_pre_issue.setText(this.preIssue);
            this.txt_pre_issue_no.setText("? + ? + ? = ?  (类型)");
          }
          if ((str5 != null) && (!"".equals(str5)))
          {
            String str7 = this.txt_pre_issue_no.getText().toString();
            String str8 = str4 + " = " + str5;
            if (!str8.equals(str7))
              this.txt_pre_issue_no.setText(str8 + "  (" + str2 + ")");
            if ((this.shangqijieguoisShowing) && (this.timeLeft > 0))
            {
              sendTouzhuRemindMsg("【" + this.preIssue + "期】开奖[" + str1 + "]:" + str4.replaceAll(" ", "") + "=" + str5);
              this.shangqijieguoisShowing = false;
            }
          }
          while ((j >= 4) && (this.twoMinutesTimerTask != null))
          {
            LogUtils.i(this.TAG, "自动获取到了上期开奖结果，关闭2分钟定时任务！");
            this.twoMinutesTimerTask.cancel();
            this.twoMinutesTimerTask = null;
            getUserAmount();
            getPreProfitAndLoseMoney();
            return;
            LogUtils.e(this.TAG, "sumValue==null");
          }
        }
      }
    }
  }

  private void dealUserAmount(BaseDataObject paramBaseDataObject)
  {
    if (paramBaseDataObject == null);
    do
    {
      return;
      if (paramBaseDataObject.getFlag() == -4)
      {
        activityStack.backToMain(MainActivity.class, this.context);
        return;
      }
      paramBaseDataObject.getFlag();
      if (paramBaseDataObject.getFlag() == -2)
      {
        showDownWireDialog();
        return;
      }
      if (paramBaseDataObject.getFlag() == -3)
      {
        ShowFengjinDialog();
        return;
      }
    }
    while (paramBaseDataObject.getFlag() != 1);
    String str = paramBaseDataObject.getResult();
    LogUtils.d("获取成功", "getUserAmount()-result:" + str);
    this.userAmount = str;
    try
    {
      double d = Double.parseDouble(this.userAmount);
      this.txt_money_left.setText(UiUtil.savePoint(d, 2) + "元宝");
      return;
    }
    catch (NumberFormatException localNumberFormatException)
    {
      localNumberFormatException.printStackTrace();
    }
  }

  private void dealpeilv(PlayStyleBean paramPlayStyleBean)
  {
    if (paramPlayStyleBean == null)
      LogUtils.e(this.TAG, "getCurrSecond-issueTimeBean == null，获取失败");
    while (true)
    {
      return;
      if (paramPlayStyleBean.getFlag() == -4)
      {
        activityStack.backToMain(MainActivity.class, this.context);
        return;
      }
      if (paramPlayStyleBean.getFlag() == 0)
      {
        UiUtil.showToast(this.context, paramPlayStyleBean.getMsg());
        return;
      }
      if (paramPlayStyleBean.getFlag() == -2)
      {
        showDownWireDialog();
        return;
      }
      if (paramPlayStyleBean.getFlag() == -3)
      {
        ShowFengjinDialog();
        return;
      }
      if (paramPlayStyleBean.getFlag() == 1)
      {
        this.playStyleBaseBeans = paramPlayStyleBean.getResult();
        if (this.myOddsPopuWindow == null)
          break;
        this.myOddsPopuWindow.setPlayStyleData(this.playStyleBaseBeans);
        if (this.playStyleBaseBeans.size() != 0)
          for (int j = 0; j < this.playStyleBaseBeans.size(); j++)
            getPlaytListRule(j, getPlayStyleId(j));
      }
    }
    LogUtils.e(this.TAG, "playStyleBaseBeans==null");
  }

  private void delay(final ChatMsgEntity paramChatMsgEntity)
  {
    this.delayHandler.postDelayed(new Runnable()
    {
      public void run()
      {
        paramChatMsgEntity.setIsSendMsgRepeatSucceed(1);
        int i = 0;
        if (i >= RoomPrimaryActivity.this.groupData.size());
        while (true)
        {
          RoomPrimaryActivity.this.refeshChatListView();
          return;
          ChatMsgEntity localChatMsgEntity = (ChatMsgEntity)RoomPrimaryActivity.this.groupData.get(i);
          if (localChatMsgEntity == null);
          while (paramChatMsgEntity != localChatMsgEntity)
          {
            i++;
            break;
          }
          RoomPrimaryActivity.this.groupData.set(i, paramChatMsgEntity);
        }
      }
    }
    , 1500L);
  }

  private void delayed()
  {
    new Handler().postDelayed(new Runnable()
    {
      public void run()
      {
        if (!"".equals(RoomPrimaryActivity.this.tv_jinji_tongzhi))
          RoomPrimaryActivity.this.tv_jinji_tongzhi.setVisibility(8);
      }
    }
    , 60000L);
  }

  private void deleOneString()
  {
    int j = this.edit_shuru.getSelectionStart();
    Editable localEditable = this.edit_shuru.getText();
    String str = this.edit_shuru.getText().toString().substring(0, j);
    if (str.lastIndexOf("]") == j - 1)
    {
      k = str.lastIndexOf("[");
      if (k == -1);
    }
    while (j == 0)
    {
      int k;
      localEditable.delete(k, j);
      do
        return;
      while (j == 0);
      localEditable.delete(j - 1, j);
      return;
    }
    localEditable.delete(j - 1, j);
  }

  private void disConnectionToXmpp()
  {
    try
    {
      if (this.connection != null)
        this.connection.disconnect();
      this.connection = null;
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  private void fengJinUserCount(final ChatMsgEntity paramChatMsgEntity)
  {
    int j = -1;
    String str = "";
    if (paramChatMsgEntity != null)
    {
      j = paramChatMsgEntity.getMemberid();
      str = paramChatMsgEntity.getNickname();
    }
    while (true)
    {
      this.bodyStr = (str + ",已被房间管理员封禁账号");
      HashMap localHashMap = new HashMap();
      localHashMap.put("memberid", this.memberId);
      localHashMap.put("banMemberid", j);
      localHashMap.put("banType", "");
      localHashMap.put("state", "3");
      LogUtils.d(this.TAG, "封禁账号URL:" + AppConstants.URL_ROOM_SETROOMNOWORD);
      RequestNet.get(this.context, AppConstants.URL_ROOM_SETROOMNOWORD, localHashMap, new StringCallback()
      {
        public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "封禁账号失败,setUserNobibiState-result:" + paramAnonymousException);
        }

        public void onResponse(String paramAnonymousString)
        {
          LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          Gson localGson = new Gson();
          try
          {
            localBaseDataObject = (BaseDataObject)localGson.fromJson(paramAnonymousString, BaseDataObject.class);
            if (localBaseDataObject == null)
              return;
          }
          catch (Exception localException)
          {
            do
            {
              BaseDataObject localBaseDataObject;
              do
              {
                while (true)
                {
                  localException.printStackTrace();
                  localBaseDataObject = null;
                }
                if (localBaseDataObject.getFlag() == -4)
                {
                  RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                  return;
                }
                if (localBaseDataObject.getFlag() == 0)
                {
                  UiUtil.showToast(RoomPrimaryActivity.this.context, localBaseDataObject.getMsg());
                  return;
                }
                if (localBaseDataObject.getFlag() == -2)
                {
                  RoomPrimaryActivity.this.showDownWireDialog();
                  return;
                }
                if (localBaseDataObject.getFlag() == -3)
                {
                  RoomPrimaryActivity.this.ShowFengjinDialog();
                  return;
                }
              }
              while (localBaseDataObject.getFlag() != 1);
              LogUtils.i(RoomPrimaryActivity.this.TAG, "封禁账号成功");
              UiUtil.showToast(RoomPrimaryActivity.this.context, "封禁账号成功");
              RoomPrimaryActivity.this.sendNobibiMsg(paramChatMsgEntity);
            }
            while (RoomPrimaryActivity.this.myDialogForbidBibi == null);
            RoomPrimaryActivity.this.myDialogForbidBibi.dismiss();
          }
        }
      });
      return;
      LogUtils.e(this.TAG, "封禁账号itemChatMsgEntity == null");
    }
  }

  private void gentou(int paramInt)
  {
    ChatMsgEntity localChatMsgEntity;
    if ((this.groupData != null) && (this.groupData.size() != 0))
    {
      localChatMsgEntity = (ChatMsgEntity)this.groupData.get(paramInt);
      if ((localChatMsgEntity != null) && ("2".equals(localChatMsgEntity.getMessagetype())));
    }
    else
    {
      return;
    }
    String str1 = localChatMsgEntity.getNickname();
    String str2 = localChatMsgEntity.getBody();
    if (str2 == null)
    {
      LogUtils.e(this.TAG, "body == null");
      return;
    }
    String[] arrayOfString = str2.split("@");
    if (arrayOfString.length < 6)
    {
      LogUtils.e(this.TAG, "bodyList.length < 6");
      return;
    }
    String str3 = arrayOfString[0];
    if (!this.isInDate)
    {
      this.myDialog1.setMessage("还未到投注时间哦");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      return;
    }
    if (this.isKaijianging)
    {
      this.myDialog1.setMessage("已封盘，停止下注");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      return;
    }
    if (!str3.equals(this.currentIssue))
    {
      this.myDialog1.setMessage("只能跟投当前期");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      return;
    }
    final String str4 = arrayOfString[1];
    final String str5 = arrayOfString[2];
    final String str6 = arrayOfString[3];
    final String str7 = arrayOfString[4];
    final String str8 = arrayOfString[5];
    this.gentouDialog.show();
    this.gentouDialog.tv_money.setText(str5);
    this.gentouDialog.tv_qishu.setText(str3);
    this.gentouDialog.tv_type.setText(str4);
    this.gentouDialog.tv_user_name.setText(str1);
    this.gentouDialog.btn_confirm.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        RoomPrimaryActivity.this.setgentouSureBtnIsEnable(false);
        try
        {
          int j = Integer.parseInt(str6);
          i = j;
          RoomPrimaryActivity.this.mIsGenTou = true;
          RoomPrimaryActivity.this.touzhuAction(str8, str7, str4, str5, i);
          return;
        }
        catch (NumberFormatException localNumberFormatException)
        {
          while (true)
          {
            localNumberFormatException.printStackTrace();
            int i = 0;
          }
        }
      }
    });
  }

  private void get4()
  {
    showLoadingDialog();
    HashMap localHashMap = new HashMap();
    localHashMap.put("guid", this.guid);
    localHashMap.put("roomid", this.roomId);
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GETTOTALINFO);
    RequestNet.get(this.context, AppConstants.URL_GETTOTALINFO, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        RoomPrimaryActivity.this.dismissLoadingDialog();
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,get4-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        RoomPrimaryActivity.this.dismissLoadingDialog();
        LogUtils.e("---", "result:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          localGetTotalInfoBean = (GetTotalInfoBean)localGson.fromJson(paramAnonymousString, GetTotalInfoBean.class);
          if (localGetTotalInfoBean == null)
            return;
        }
        catch (Exception localException)
        {
          GetTotalInfoBean localGetTotalInfoBean;
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localGetTotalInfoBean = null;
            }
            if (localGetTotalInfoBean.getFlag() == -4)
            {
              RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
              return;
            }
            localGetTotalInfoBean.getFlag();
            if (localGetTotalInfoBean.getFlag() == -2)
            {
              RoomPrimaryActivity.this.showDownWireDialog();
              return;
            }
            if (localGetTotalInfoBean.getFlag() == -3)
            {
              RoomPrimaryActivity.this.ShowFengjinDialog();
              return;
            }
          }
          while (localGetTotalInfoBean.getFlag() != 1);
          LogUtils.e(RoomPrimaryActivity.this.TAG, "getTotalInfoBean.getFlag() == 1");
          RoomPrimaryActivity.this.myGrade = localGetTotalInfoBean.getUsergrade();
          IssueBean localIssueBean1 = localGetTotalInfoBean.getGetCurrentIssue();
          RoomPrimaryActivity.this.dealNowPreData(localIssueBean1);
          IssueBean localIssueBean2 = localGetTotalInfoBean.getGetPreIssue();
          RoomPrimaryActivity.this.dealPreDate(localIssueBean2);
          BaseDataObject localBaseDataObject = localGetTotalInfoBean.getGetUserAmount();
          RoomPrimaryActivity.this.dealUserAmount(localBaseDataObject);
          PlayStyleBean localPlayStyleBean = localGetTotalInfoBean.getPlaytypelist();
          RoomPrimaryActivity.this.dealpeilv(localPlayStyleBean);
        }
      }
    });
  }

  private void getCurrSecond()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_CURRENT_SECOND);
    RequestNet.get(this.context, AppConstants.URL_GET_CURRENT_SECOND, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getCurrSecond-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          return;
        }
        Gson localGson = new Gson();
        try
        {
          localIssueTimeBean = (IssueTimeBean)localGson.fromJson(paramAnonymousString, IssueTimeBean.class);
          if (localIssueTimeBean == null)
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "getCurrSecond-issueTimeBean == null，获取失败");
            return;
          }
        }
        catch (Exception localException)
        {
          IssueTimeBean localIssueTimeBean;
          while (true)
          {
            localException.printStackTrace();
            localIssueTimeBean = null;
          }
          if (localIssueTimeBean.getFlag() == -4)
          {
            RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
            return;
          }
          if (localIssueTimeBean.getFlag() == 1)
          {
            int i = localIssueTimeBean.getResult();
            RoomPrimaryActivity.this.timeLeft = i;
            LogUtils.d(RoomPrimaryActivity.this.TAG, "the issue last time:" + i);
            return;
          }
          if (localIssueTimeBean.getFlag() == -2)
          {
            RoomPrimaryActivity.this.showDownWireDialog();
            return;
          }
          UiUtil.showToast(RoomPrimaryActivity.this.context, localIssueTimeBean.getMsg());
          LogUtils.e(RoomPrimaryActivity.this.TAG, "getCurrSecond():" + localIssueTimeBean.getMsg());
        }
      }
    });
  }

  private void getCurrentIssue()
  {
    if (!"".equals(this.iv_arrow.getText()))
      this.iv_arrow.setVisibility(4);
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.i(this.TAG, "getCurrentIssue()-lotteryid:" + this.lotteryid);
    LogUtils.i(this.TAG, "URL:" + AppConstants.URL_GET_CURRENT_ISSUE);
    RequestNet.get(this.context, AppConstants.URL_GET_CURRENT_ISSUE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        RoomPrimaryActivity.this.ShowDialog1("网络不给力");
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getCurrentIssue-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "---------:" + paramAnonymousString);
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)));
        IssueBean localIssueBean;
        label321: label895: 
        do
        {
          IssueBaseBean localIssueBaseBean;
          do
          {
            do
              while (true)
              {
                return;
                Gson localGson = new Gson();
                try
                {
                  localIssueBean = (IssueBean)localGson.fromJson(paramAnonymousString, IssueBean.class);
                  if (localIssueBean == null)
                  {
                    UiUtil.showToast(RoomPrimaryActivity.this.context, "获取失败");
                    return;
                  }
                }
                catch (Exception localException)
                {
                  while (true)
                  {
                    localException.printStackTrace();
                    localIssueBean = null;
                  }
                  if (localIssueBean.getFlag() == -4)
                  {
                    RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                    return;
                  }
                  localIssueBaseBean = localIssueBean.getResult();
                  String str1 = localIssueBean.getCurtime();
                  LogUtils.i(RoomPrimaryActivity.this.TAG, "currentServerTime:" + str1);
                  RoomPrimaryActivity.this.serverDate = DateUtil.getDateFromTimeString(str1, "yyyy-MM-dd HH:mm:ss");
                  RoomPrimaryActivity.this.setNobibiStateByServerTime();
                  String str2 = str1.substring(0, 11);
                  if ("1".equals(RoomPrimaryActivity.this.lotteryid))
                  {
                    RoomPrimaryActivity.this.tv_game_time.setText("本游戏开售时间为09：00-23：55");
                    Date localDate5 = DateUtil.getDateFromTimeString(str2 + "09:00:00", "yyyy-MM-dd HH:mm:ss");
                    Date localDate6 = DateUtil.getDateFromTimeString(str2 + "23:55:00", "yyyy-MM-dd HH:mm:ss");
                    RoomPrimaryActivity.this.isInDate = DateUtil.isInDate(RoomPrimaryActivity.this.serverDate, localDate5, localDate6);
                    LogUtils.e(RoomPrimaryActivity.this.TAG, "lotteryid=1,isInDate:" + RoomPrimaryActivity.this.isInDate);
                    if (!RoomPrimaryActivity.this.isInDate)
                      break label827;
                    RoomPrimaryActivity.this.tv_game_time.setVisibility(8);
                    RoomPrimaryActivity.this.lin_0.setVisibility(0);
                  }
                  while (true)
                  {
                    if (localIssueBean.getFlag() != 0)
                      break label895;
                    if (!"3".equals(RoomPrimaryActivity.this.lotteryid))
                      break;
                    Date localDate1 = DateUtil.getDateFromTimeString(str2 + localIssueBean.getOpentime(), "yyyy-MM-dd HH:mm:ss");
                    Date localDate2 = DateUtil.getDateFromTimeString(str2 + localIssueBean.getEndtime(), "yyyy-MM-dd HH:mm:ss");
                    RoomPrimaryActivity.this.isInDate = DateUtil.isInDate(RoomPrimaryActivity.this.serverDate, localDate1, localDate2);
                    LogUtils.e(RoomPrimaryActivity.this.TAG, "isInDate:" + RoomPrimaryActivity.this.isInDate);
                    if (!RoomPrimaryActivity.this.isInDate)
                      break;
                    RoomPrimaryActivity.this.tv_begin_time.setText("开售时间" + localIssueBean.getDescription());
                    RoomPrimaryActivity.this.tv_begin_time.setVisibility(0);
                    RoomPrimaryActivity.this.txt_current_issue.setText("?");
                    RoomPrimaryActivity.this.ll_jiezhi.setVisibility(8);
                    RoomPrimaryActivity.this.txt_time_left.setText("已停售...");
                    if (!RoomPrimaryActivity.this.tingshouisShowing)
                      break;
                    String str5 = "各位老板，本游戏每天在本时间段内需要进行服务器维护，暂停销售，再次开售时间" + localIssueBean.getDescription() + "，想继续娱乐的老板请耐心等待或到隔壁的北京 28 房间娱乐！！！";
                    RoomPrimaryActivity.this.yanshi1sSend(str5);
                    RoomPrimaryActivity.this.tingshouisShowing = false;
                    return;
                    if ("2".equals(RoomPrimaryActivity.this.lotteryid))
                    {
                      RoomPrimaryActivity.this.tv_game_time.setText("本游戏开售时间为00：00-09：00");
                      Date localDate3 = DateUtil.getDateFromTimeString(str2 + "00:00:00", "yyyy-MM-dd HH:mm:ss");
                      Date localDate4 = DateUtil.getDateFromTimeString(str2 + "23:59:59", "yyyy-MM-dd HH:mm:ss");
                      RoomPrimaryActivity.this.isInDate = DateUtil.isInDate(RoomPrimaryActivity.this.serverDate, localDate3, localDate4);
                      LogUtils.e(RoomPrimaryActivity.this.TAG, "lotteryid=2,isInDate:" + RoomPrimaryActivity.this.isInDate);
                      break label321;
                    }
                    if (!"3".equals(RoomPrimaryActivity.this.lotteryid))
                      break label321;
                    RoomPrimaryActivity.this.isInDate = true;
                    LogUtils.e(RoomPrimaryActivity.this.TAG, "lotteryid=3,isInDate:" + RoomPrimaryActivity.this.isInDate);
                    break label321;
                    RoomPrimaryActivity.this.tv_game_time.setVisibility(0);
                    RoomPrimaryActivity.this.lin_0.setVisibility(8);
                    if (("1".equals(RoomPrimaryActivity.this.lotteryid)) && (RoomPrimaryActivity.this.tingshouisShowing))
                    {
                      RoomPrimaryActivity.this.yanshi1sSend("各位老板，本游戏现处于停售时间段，想要继续娱乐的老板请到隔壁加拿大28房间娱乐！！！");
                      RoomPrimaryActivity.this.tingshouisShowing = false;
                    }
                  }
                  if (localIssueBean.getFlag() == -2)
                  {
                    RoomPrimaryActivity.this.showDownWireDialog();
                    return;
                  }
                  if (localIssueBean.getFlag() == -3)
                  {
                    RoomPrimaryActivity.this.ShowFengjinDialog();
                    return;
                  }
                }
              }
            while (localIssueBean.getFlag() != 1);
            LogUtils.e(RoomPrimaryActivity.this.TAG, "issueBean.getFlag() == 1");
            if (localIssueBean.getIssale() != 1)
              break;
            LogUtils.e(RoomPrimaryActivity.this.TAG, "issueBean.getIssale() == 1");
            if ("-1".equals(localIssueBean.getStatus()))
            {
              LogUtils.e(RoomPrimaryActivity.this.TAG, "-1.equals(issueBean.getStatus())");
              RoomPrimaryActivity.this.txt_time_left.setText("已停售...");
              return;
            }
          }
          while (localIssueBaseBean == null);
          if (((int)RoomPrimaryActivity.this.minsinglebe == 0) || ((int)RoomPrimaryActivity.this.singlebet == 0) || ((int)RoomPrimaryActivity.this.sumbet == 0))
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "获取房间投注限制 暂未获取到数据 getRoomRule()");
            return;
          }
          RoomPrimaryActivity.this.currentIssue = localIssueBaseBean.getIssue();
          RoomPrimaryActivity.this.txt_current_issue.setText(RoomPrimaryActivity.this.currentIssue);
          if (("1".equals(RoomPrimaryActivity.this.lotteryid)) || ("2".equals(RoomPrimaryActivity.this.lotteryid)))
          {
            RoomPrimaryActivity.this.timeLeft = (-30 + (2 + localIssueBean.getSecond()));
            RoomPrimaryActivity.this.thirtySecond = 30;
            if (localIssueBean.getSecond() <= 30)
              RoomPrimaryActivity.this.thirtySecond = localIssueBean.getSecond();
            if (RoomPrimaryActivity.this.timer != null)
            {
              if (RoomPrimaryActivity.this.currentIssueTimerTask != null)
              {
                RoomPrimaryActivity.this.currentIssueTimerTask.cancel();
                LogUtils.e(RoomPrimaryActivity.this.TAG, "取消获取当前期任务：剩余时间" + RoomPrimaryActivity.this.timeLeft);
                RoomPrimaryActivity.this.currentIssueTimerTask = null;
              }
              RoomPrimaryActivity.this.currentIssueTimerTask = new RoomPrimaryActivity.CurrentIssueTimerTask(RoomPrimaryActivity.this);
              RoomPrimaryActivity.this.timer.scheduleAtFixedRate(RoomPrimaryActivity.this.currentIssueTimerTask, 0L, 1000L);
              LogUtils.e(RoomPrimaryActivity.this.TAG, "执行获取当前期任务：剩余时间" + RoomPrimaryActivity.this.timeLeft);
              if ((!RoomPrimaryActivity.this.isInDate) || (RoomPrimaryActivity.this.timeLeft <= 0))
                break label1488;
              String str3 = "【" + RoomPrimaryActivity.this.currentIssue + "期】单注" + (int)RoomPrimaryActivity.this.minsinglebe + "起， " + (int)RoomPrimaryActivity.this.singlebet + "封顶，总注" + (int)RoomPrimaryActivity.this.sumbet + "封顶" + "<br>★★现在可以开始下注★★";
              if (!RoomPrimaryActivity.this.touzhuisShowing)
              {
                RoomPrimaryActivity.this.yanshi1sSend(str3);
                RoomPrimaryActivity.this.touzhuisShowing = true;
              }
            }
          }
          while (true)
          {
            Log.d(RoomPrimaryActivity.this.TAG, "the issue last time:" + RoomPrimaryActivity.this.timeLeft);
            return;
            LogUtils.d(RoomPrimaryActivity.this.TAG, "已停售");
            continue;
            if ("3".equals(RoomPrimaryActivity.this.lotteryid))
            {
              RoomPrimaryActivity.this.timeLeft = (-15 + (2 + localIssueBean.getSecond()));
              RoomPrimaryActivity.this.thirtySecond = 15;
              if (localIssueBean.getSecond() <= 15)
                RoomPrimaryActivity.this.thirtySecond = localIssueBean.getSecond();
              if (RoomPrimaryActivity.this.timer != null)
              {
                if (RoomPrimaryActivity.this.currentIssueTimerTask != null)
                {
                  RoomPrimaryActivity.this.currentIssueTimerTask.cancel();
                  LogUtils.e(RoomPrimaryActivity.this.TAG, "取消获取当前期任务：剩余时间" + RoomPrimaryActivity.this.timeLeft);
                  RoomPrimaryActivity.this.currentIssueTimerTask = null;
                }
                RoomPrimaryActivity.this.currentIssueTimerTask = new RoomPrimaryActivity.CurrentIssueTimerTask(RoomPrimaryActivity.this);
                RoomPrimaryActivity.this.timer.scheduleAtFixedRate(RoomPrimaryActivity.this.currentIssueTimerTask, 0L, 1000L);
                LogUtils.e(RoomPrimaryActivity.this.TAG, "执行获取当前期任务：剩余时间" + RoomPrimaryActivity.this.timeLeft);
                if ((RoomPrimaryActivity.this.isInDate) && (RoomPrimaryActivity.this.timeLeft > 0))
                {
                  String str4 = "【" + RoomPrimaryActivity.this.currentIssue + "期】单注" + (int)RoomPrimaryActivity.this.minsinglebe + "起， " + (int)RoomPrimaryActivity.this.singlebet + "封顶，总注" + (int)RoomPrimaryActivity.this.sumbet + "封顶" + "<br>★★现在可以开始下注★★";
                  if (!RoomPrimaryActivity.this.jianadatouzhuisShowing)
                  {
                    RoomPrimaryActivity.this.yanshi1sSend(str4);
                    RoomPrimaryActivity.this.jianadatouzhuisShowing = true;
                  }
                }
              }
            }
          }
        }
        while (localIssueBean.getIssale() != 0);
        label827: label1488: RoomPrimaryActivity.this.txt_time_left.setText("维护中...");
      }
    });
  }

  private void getDatasFromServer()
  {
    get4();
    getCurrentIssue();
    getPreIssue();
    getNearlyIssueResultList();
    getPreProfitAndLoseMoney();
    getUserAmount();
    getUserNobibiState();
  }

  private void getNearlyIssueResultList()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    localHashMap.put("page", "1");
    localHashMap.put("Pagesize", "10");
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_ISSUE_RESULT_LIST);
    RequestNet.get(this.context, AppConstants.URL_GET_ISSUE_RESULT_LIST, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getNearlyIssueResultList-result:" + paramAnonymousException);
        RoomPrimaryActivity.this.list_kaijiang.setEmptyView(RoomPrimaryActivity.this.emptyView);
        RoomPrimaryActivity.this.tv_tishi.setText("获取失败");
      }

      public void onResponse(String paramAnonymousString)
      {
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          RoomPrimaryActivity.this.tv_tishi.setText("获取失败");
          return;
        }
        Gson localGson = new Gson();
        try
        {
          localIssueListBean = (IssueListBean)localGson.fromJson(paramAnonymousString, IssueListBean.class);
          if (localIssueListBean == null)
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "getCurrSecond-issueTimeBean == null，获取失败");
            RoomPrimaryActivity.this.tv_tishi.setText("获取失败");
            return;
          }
        }
        catch (Exception localException)
        {
          IssueListBean localIssueListBean;
          while (true)
          {
            localException.printStackTrace();
            localIssueListBean = null;
          }
          if (localIssueListBean.getFlag() == -4)
          {
            RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
            return;
          }
          if (localIssueListBean.getFlag() == -2)
          {
            RoomPrimaryActivity.this.showDownWireDialog();
            return;
          }
          if (localIssueListBean.getFlag() == 1)
          {
            RoomPrimaryActivity.this.issueListBaseBeanList = localIssueListBean.getResult();
            if (RoomPrimaryActivity.this.kaijiangListAdapter != null)
            {
              RoomPrimaryActivity.this.kaijiangListAdapter.setData(RoomPrimaryActivity.this.issueListBaseBeanList);
              RoomPrimaryActivity.this.kaijiangListAdapter.notifyDataSetChanged();
            }
            if (RoomPrimaryActivity.this.issueListBaseBeanList.size() > 0)
            {
              IssueListBaseBean localIssueListBaseBean = (IssueListBaseBean)RoomPrimaryActivity.this.issueListBaseBeanList.get(0);
              if (localIssueListBaseBean != null)
              {
                RoomPrimaryActivity.this.diyitiaoqihao = localIssueListBaseBean.getIssue();
                String str1 = localIssueListBaseBean.getRealResult().replace(",", " + ");
                String str2 = localIssueListBaseBean.getSumValue();
                String str3 = localIssueListBaseBean.getRealWin();
                if ((str2 == null) || ("".equals(str2)))
                  break label359;
                RoomPrimaryActivity.this.diyitiaojieguo = (str1 + " = " + str2 + "  (" + str3 + ")");
              }
            }
            while (true)
            {
              RoomPrimaryActivity.this.getPreIssue();
              return;
              label359: LogUtils.e(RoomPrimaryActivity.this.TAG, "上期期号没有获取到");
            }
          }
          UiUtil.showToast(RoomPrimaryActivity.this.context, localIssueListBean.getMsg());
          LogUtils.e(RoomPrimaryActivity.this.TAG, "获取最近10期开奖结果getNearlyIssueResultList():" + localIssueListBean.getMsg());
          RoomPrimaryActivity.this.tv_tishi.setText("获取失败");
        }
      }
    });
  }

  private void getNextIssue()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.d(this.TAG, "getNextIssue()-lotteryid:" + this.lotteryid);
    LogUtils.d(this.TAG, "getNextIssue()-URL:" + AppConstants.URL_GET_NEXT_ISSUE);
    RequestNet.get(this.context, AppConstants.URL_GET_NEXT_ISSUE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getNextIssue-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
        IssueBean localIssueBean;
        IssueBaseBean localIssueBaseBean;
        do
          while (true)
          {
            return;
            Gson localGson = new Gson();
            try
            {
              localIssueBean = (IssueBean)localGson.fromJson(paramAnonymousString, IssueBean.class);
              if (localIssueBean == null)
              {
                UiUtil.showToast(RoomPrimaryActivity.this.context, "获取失败");
                return;
              }
            }
            catch (Exception localException)
            {
              while (true)
              {
                localException.printStackTrace();
                localIssueBean = null;
              }
              if (localIssueBean.getFlag() == -4)
              {
                RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                return;
              }
              if (localIssueBean.getFlag() == 0)
              {
                if (localIssueBean.getMsg() != null)
                {
                  UiUtil.showToast(RoomPrimaryActivity.this.context, localIssueBean.getMsg());
                  LogUtils.e(RoomPrimaryActivity.this.TAG, "getNextIssue():" + localIssueBean.getMsg());
                }
              }
              else
              {
                if (localIssueBean.getFlag() == -2)
                {
                  RoomPrimaryActivity.this.showDownWireDialog();
                  return;
                }
                if (localIssueBean.getFlag() == -3)
                {
                  RoomPrimaryActivity.this.ShowFengjinDialog();
                  return;
                }
                localIssueBaseBean = localIssueBean.getResult();
              }
            }
          }
        while ((localIssueBean.getFlag() != 1) || (localIssueBaseBean == null));
        localIssueBaseBean.getResult();
      }
    });
  }

  private int getPlayStyleId(int paramInt)
  {
    int j = -1;
    if ((this.playStyleBaseBeans == null) || (this.playStyleBaseBeans.size() == 0))
    {
      getPlaytList();
      LogUtils.e(this.TAG, "getPlayStyleId()-playStyleBaseBeans == null || playStyleBaseBeans.size() == 0");
      return j;
    }
    if ((this.playStyleBaseBeans != null) && (this.playStyleBaseBeans.size() != 0))
    {
      if (paramInt > -1 + this.playStyleBaseBeans.size())
      {
        LogUtils.e(this.TAG, "getPlayStyleId()-下标越界！");
        return j;
      }
      PlayStyleBaseBean localPlayStyleBaseBean = (PlayStyleBaseBean)this.playStyleBaseBeans.get(paramInt);
      if (localPlayStyleBaseBean == null)
      {
        LogUtils.e(this.TAG, "getPlayStyleId()-model == null");
        return j;
      }
      j = localPlayStyleBaseBean.getId();
      LogUtils.e(this.TAG, "getPlayStyleId()-获取到了playId=" + j);
    }
    LogUtils.e(this.TAG, "getPlayStyleId()-playId=" + j);
    return j;
  }

  private void getPlaytListRule(final int paramInt1, int paramInt2)
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("playid", paramInt2);
    localHashMap.put("roomid", this.parentid);
    LogUtils.i(this.TAG, "playid:" + paramInt2);
    LogUtils.i(this.TAG, "roomid:" + this.parentid);
    LogUtils.i(this.TAG, "获取投注类型玩法URL:" + AppConstants.URL_GET_RULELIST);
    RequestNet.get(this.context, AppConstants.URL_GET_RULELIST, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getPlaytList-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
        do
        {
          do
          {
            RuleBean localRuleBean;
            do
            {
              do
              {
                do
                {
                  do
                  {
                    return;
                    Gson localGson = new Gson();
                    try
                    {
                      localRuleBean = (RuleBean)localGson.fromJson(paramAnonymousString, RuleBean.class);
                      if (localRuleBean == null)
                      {
                        LogUtils.e(RoomPrimaryActivity.this.TAG, "getCurrSecond-issueTimeBean == null，获取失败");
                        return;
                      }
                    }
                    catch (Exception localException)
                    {
                      while (true)
                      {
                        localException.printStackTrace();
                        localRuleBean = null;
                      }
                      if (localRuleBean.getFlag() == -4)
                      {
                        RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                        return;
                      }
                      if (localRuleBean.getFlag() == 0)
                      {
                        UiUtil.showToast(RoomPrimaryActivity.this.context, localRuleBean.getMsg());
                        return;
                      }
                      if (localRuleBean.getFlag() == -2)
                      {
                        RoomPrimaryActivity.this.showDownWireDialog();
                        return;
                      }
                      if (localRuleBean.getFlag() == -3)
                      {
                        RoomPrimaryActivity.this.ShowFengjinDialog();
                        return;
                      }
                    }
                  }
                  while (localRuleBean.getFlag() != 1);
                  switch (paramInt1)
                  {
                  default:
                    return;
                  case 0:
                    RoomPrimaryActivity.this.ruleBaseBeansDa = localRuleBean.getResult();
                    if (RoomPrimaryActivity.this.daxiaodanSGridViewAdapter != null)
                    {
                      RoomPrimaryActivity.this.daxiaodanSGridViewAdapter.setData(RoomPrimaryActivity.this.ruleBaseBeansDa);
                      RoomPrimaryActivity.this.daxiaodanSGridViewAdapter.notifyDataSetChanged();
                    }
                    break;
                  case 1:
                  case 2:
                  }
                }
                while ((RoomPrimaryActivity.this.ruleBaseBeansDa == null) || (RoomPrimaryActivity.this.mCurrentPager != paramInt1));
                RuleBaseBean localRuleBaseBean3;
                if (RoomPrimaryActivity.this.ruleBaseBeansDa.size() > RoomPrimaryActivity.this.daxiaoDSPosition)
                  localRuleBaseBean3 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansDa.get(RoomPrimaryActivity.this.daxiaoDSPosition);
                while (true)
                {
                  String str3 = localRuleBaseBean3.getWinNumber();
                  RoomPrimaryActivity.this.roleId = localRuleBaseBean3.getId();
                  RoomPrimaryActivity.this.Odds = localRuleBaseBean3.getOdds();
                  RoomPrimaryActivity.this.roleName = localRuleBaseBean3.getName();
                  RoomPrimaryActivity.this.tv_introduce_daxiao.setText("中奖和值：" + str3);
                  RoomPrimaryActivity.this.playStyleId = localRuleBaseBean3.getPlayId();
                  return;
                  localRuleBaseBean3 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansDa.get(0);
                  RoomPrimaryActivity.this.daxiaodanSGridViewAdapter.setSelection(0);
                }
                RoomPrimaryActivity.this.ruleBaseBeansCai = localRuleBean.getResult();
              }
              while (RoomPrimaryActivity.this.caishuziGridViewAdapter == null);
              RoomPrimaryActivity.this.caishuziGridViewAdapter.setData(RoomPrimaryActivity.this.ruleBaseBeansCai);
              RoomPrimaryActivity.this.caishuziGridViewAdapter.notifyDataSetChanged();
            }
            while ((RoomPrimaryActivity.this.ruleBaseBeansCai == null) || (RoomPrimaryActivity.this.mCurrentPager != paramInt1));
            RuleBaseBean localRuleBaseBean2;
            if (RoomPrimaryActivity.this.ruleBaseBeansCai.size() > RoomPrimaryActivity.this.caishuziPosition)
              localRuleBaseBean2 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansCai.get(RoomPrimaryActivity.this.caishuziPosition);
            while (true)
            {
              String str2 = localRuleBaseBean2.getWinNumber();
              RoomPrimaryActivity.this.roleId = localRuleBaseBean2.getId();
              RoomPrimaryActivity.this.Odds = localRuleBaseBean2.getOdds();
              RoomPrimaryActivity.this.roleName = localRuleBaseBean2.getName();
              RoomPrimaryActivity.this.tv_introduce_daxiao.setText("中奖和值：" + str2);
              RoomPrimaryActivity.this.playStyleId = localRuleBaseBean2.getPlayId();
              return;
              localRuleBaseBean2 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansCai.get(0);
              RoomPrimaryActivity.this.caishuziGridViewAdapter.setSelection(0);
            }
            RoomPrimaryActivity.this.ruleBaseBeansTe = localRuleBean.getResult();
          }
          while (RoomPrimaryActivity.this.teshuWanFGridViewAdapter == null);
          RoomPrimaryActivity.this.teshuWanFGridViewAdapter.setData(RoomPrimaryActivity.this.ruleBaseBeansTe);
          RoomPrimaryActivity.this.teshuWanFGridViewAdapter.notifyDataSetChanged();
        }
        while ((RoomPrimaryActivity.this.ruleBaseBeansTe == null) || (RoomPrimaryActivity.this.mCurrentPager != paramInt1));
        RuleBaseBean localRuleBaseBean1;
        if (RoomPrimaryActivity.this.ruleBaseBeansTe.size() > RoomPrimaryActivity.this.teshuWFPosition)
          localRuleBaseBean1 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansTe.get(RoomPrimaryActivity.this.teshuWFPosition);
        while (true)
        {
          String str1 = localRuleBaseBean1.getWinNumber();
          RoomPrimaryActivity.this.roleId = localRuleBaseBean1.getId();
          RoomPrimaryActivity.this.Odds = localRuleBaseBean1.getOdds();
          RoomPrimaryActivity.this.roleName = localRuleBaseBean1.getName();
          RoomPrimaryActivity.this.tv_introduce_daxiao.setText("中奖和值：" + str1);
          RoomPrimaryActivity.this.playStyleId = localRuleBaseBean1.getPlayId();
          return;
          localRuleBaseBean1 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansTe.get(0);
          RoomPrimaryActivity.this.teshuWanFGridViewAdapter.setSelection(0);
        }
      }
    });
  }

  private void getPreIssue()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.d(this.TAG, "getPreIssue()-lotteryid:" + this.lotteryid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_PRE_ISSUE);
    RequestNet.get(this.context, AppConstants.URL_GET_PRE_ISSUE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getPreIssue-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          return;
        }
        Gson localGson = new Gson();
        try
        {
          localIssueBean = (IssueBean)localGson.fromJson(paramAnonymousString, IssueBean.class);
          RoomPrimaryActivity.this.dealPreDate(localIssueBean);
          return;
        }
        catch (Exception localException)
        {
          while (true)
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "Exception:" + localException.getMessage() + "s:" + paramAnonymousString);
            RoomPrimaryActivity.this.txt_pre_issue.setText(RoomPrimaryActivity.this.diyitiaoqihao);
            RoomPrimaryActivity.this.txt_pre_issue_no.setText(RoomPrimaryActivity.this.diyitiaojieguo);
            IssueBean localIssueBean = null;
          }
        }
      }
    });
  }

  private void getTopTenChats()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("pagesize", "10");
    localHashMap.put("page", this.page);
    localHashMap.put("roomid", this.roomId);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_ROOM_TOP_TEN_CHATS);
    RequestNet.get(this.context, AppConstants.URL_GET_ROOM_TOP_TEN_CHATS, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getNextIssue-result:" + paramAnonymousException);
        RoomPrimaryActivity.this.isTopTen = true;
        if (RoomPrimaryActivity.this.connection == null)
          RoomPrimaryActivity.this.connectToXmpp();
        while (RoomPrimaryActivity.this.connection.isConnected())
          return;
        RoomPrimaryActivity.this.connectToXmpp();
      }

      public void onResponse(String paramAnonymousString)
      {
        RoomPrimaryActivity.this.isTopTen = true;
        if (RoomPrimaryActivity.this.connection == null)
          RoomPrimaryActivity.this.connectToXmpp();
        ChatMsgModel localChatMsgModel;
        do
        {
          while ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
            return;
            if (!RoomPrimaryActivity.this.connection.isConnected())
              RoomPrimaryActivity.this.connectToXmpp();
          }
          Gson localGson = new Gson();
          try
          {
            localChatMsgModel = (ChatMsgModel)localGson.fromJson(paramAnonymousString, ChatMsgModel.class);
            if (localChatMsgModel == null)
            {
              UiUtil.showToast(RoomPrimaryActivity.this.context, "获取失败");
              return;
            }
          }
          catch (Exception localException)
          {
            while (true)
            {
              localException.printStackTrace();
              localChatMsgModel = null;
            }
            if (localChatMsgModel.getFlag() == 0)
            {
              UiUtil.showToast(RoomPrimaryActivity.this.context, localChatMsgModel.getMsg());
              return;
            }
            if (localChatMsgModel.getFlag() == -4)
            {
              RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
              return;
            }
            if (localChatMsgModel.getFlag() == -2)
            {
              RoomPrimaryActivity.this.showDownWireDialog();
              return;
            }
            if (localChatMsgModel.getFlag() == -3)
            {
              RoomPrimaryActivity.this.ShowFengjinDialog();
              return;
            }
          }
        }
        while (localChatMsgModel.getFlag() != 1);
        ArrayList localArrayList = localChatMsgModel.getResult();
        ChatMsgEntity localChatMsgEntity;
        for (int i = 0; ; i++)
        {
          if (i >= localArrayList.size())
          {
            if (RoomPrimaryActivity.this.groupchatMsgViewAdpater == null)
              break;
            RoomPrimaryActivity.this.groupchatMsgViewAdpater.setData(RoomPrimaryActivity.this.groupData);
            RoomPrimaryActivity.this.groupchatMsgViewAdpater.setCount(RoomPrimaryActivity.this.groupData.size());
            RoomPrimaryActivity.this.groupchatMsgViewAdpater.notifyDataSetChanged();
            int j = RoomPrimaryActivity.this.groupchatMsgViewAdpater.getCount();
            RoomPrimaryActivity.this.list_group_chat.setSelection(j);
            LogUtils.i(RoomPrimaryActivity.this.TAG, "getTopTenChats()-groupData.size():" + RoomPrimaryActivity.this.groupData.size());
            LogUtils.i(RoomPrimaryActivity.this.TAG, "getTopTenChats()-adapterCount:" + j);
            return;
          }
          localChatMsgEntity = (ChatMsgEntity)localArrayList.get(i);
          if (localChatMsgEntity != null)
            break label432;
        }
        label432: String str = localChatMsgEntity.getNickname();
        LogUtils.d(RoomPrimaryActivity.this.TAG, "nickNameStr:" + str);
        if (str.equals(RoomPrimaryActivity.this.nickName))
        {
          localChatMsgEntity.setComMsg(1);
          localChatMsgEntity.setIsSendMsg(1);
        }
        while (true)
        {
          RoomPrimaryActivity.this.groupData.add(localChatMsgEntity);
          break;
          localChatMsgEntity.setComMsg(0);
        }
      }
    });
  }

  private void getUserAmount()
  {
    this.txt_money_left.setText("获取中...");
    HashMap localHashMap = new HashMap();
    localHashMap.put("guid", this.guid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_USER_AMOUNT);
    RequestNet.get(this.context, AppConstants.URL_GET_USER_AMOUNT, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getUserAmount-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          localBaseDataObject = (BaseDataObject)localGson.fromJson(paramAnonymousString, BaseDataObject.class);
          RoomPrimaryActivity.this.dealUserAmount(localBaseDataObject);
          return;
        }
        catch (Exception localException)
        {
          while (true)
          {
            localException.printStackTrace();
            BaseDataObject localBaseDataObject = null;
          }
        }
      }
    });
  }

  private void getUserNobibiState()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", this.memberId);
    LogUtils.d(this.TAG, "获取用户禁言状态URL:" + AppConstants.URL_GET_NOWORD_USER_STATE);
    RequestNet.get(this.context, AppConstants.URL_GET_NOWORD_USER_STATE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取禁言状态失败,getUserNobibiState-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
        Gson localGson = new Gson();
        NobibiBaseModel localNobibiBaseModel;
        try
        {
          localNobibiBean = (NobibiBean)localGson.fromJson(paramAnonymousString, NobibiBean.class);
          if (localNobibiBean == null)
            return;
        }
        catch (Exception localException)
        {
          NobibiBean localNobibiBean;
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localNobibiBean = null;
            }
            if (localNobibiBean.getFlag() == -4)
            {
              RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
              return;
            }
            if (localNobibiBean.getFlag() == 0)
            {
              UiUtil.showToast(RoomPrimaryActivity.this.context, localNobibiBean.getMsg());
              return;
            }
            if (localNobibiBean.getFlag() == -2)
            {
              RoomPrimaryActivity.this.showDownWireDialog();
              return;
            }
            if (localNobibiBean.getFlag() == -3)
            {
              RoomPrimaryActivity.this.ShowFengjinDialog();
              return;
            }
          }
          while (localNobibiBean.getFlag() != 1);
          LogUtils.i(RoomPrimaryActivity.this.TAG, "获取禁言状态成功");
          localNobibiBaseModel = localNobibiBean.getResult();
          if (localNobibiBaseModel != null)
            break label304;
        }
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取禁言状态model==null");
        while (true)
        {
          LogUtils.i(RoomPrimaryActivity.this.TAG, "userNoBibiState:" + RoomPrimaryActivity.this.userNoBibiState);
          LogUtils.i(RoomPrimaryActivity.this.TAG, "reason:" + RoomPrimaryActivity.this.userNoBibireason);
          LogUtils.i(RoomPrimaryActivity.this.TAG, "userNoBibiEndTime:" + RoomPrimaryActivity.this.userNoBibiEndTime);
          return;
          label304: RoomPrimaryActivity.this.userNoBibiState = localNobibiBaseModel.getState();
          RoomPrimaryActivity.this.userNoBibireason = localNobibiBaseModel.getReason();
          RoomPrimaryActivity.this.userNoBibiEndTime = localNobibiBaseModel.getEndtime();
        }
      }
    });
  }

  private void goTouzhu(final String paramString1, final String paramString2, final String paramString3, final String paramString4, final int paramInt)
  {
    if (this.edit_jine != null)
      this.edit_jine.setText("");
    if (this.isKaijianging)
    {
      this.myDialog1.setMessage("已封盘，停止下注");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
      return;
    }
    if ("".equals(paramString4))
    {
      this.myDialog1.setMessage("请填写投注金额");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
      return;
    }
    try
    {
      d3 = Double.parseDouble(paramString4);
      LogUtils.e(this.TAG, "userAmount:" + this.userAmount);
      if (d3 < this.minsinglebe)
      {
        this.myDialog1.setMessage("单笔投注金额不能小于" + (int)this.minsinglebe + "元宝");
        this.myDialog1.show();
        this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymousView)
          {
            if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
              RoomPrimaryActivity.this.myDialog1.dismiss();
          }
        });
        setTouzhuBut();
        return;
      }
    }
    catch (Exception localException1)
    {
      double d3;
      setTouzhuBut();
      localException1.printStackTrace();
      int j;
      do
      {
        try
        {
          double d1 = Double.parseDouble(paramString4);
          double d2 = Double.parseDouble(this.userAmount);
          if (d1 > d2)
          {
            LogUtils.e(this.TAG, "投注金额" + d1);
            LogUtils.e(this.TAG, "用户余额" + d2);
            this.dialogyuECharge.show();
            if ((this.gentouDialog != null) && (this.gentouDialog.isShowing()))
              this.gentouDialog.dismiss();
            this.dialogyuECharge.btn_confirm.setOnClickListener(new View.OnClickListener()
            {
              public void onClick(View paramAnonymousView)
              {
                RoomPrimaryActivity.this.dialogyuECharge.dismiss();
              }
            });
            setTouzhuBut();
            return;
          }
        }
        catch (Exception localException2)
        {
          localException2.printStackTrace();
          setTouzhuBut();
          HashMap localHashMap = new HashMap();
          localHashMap.put("lotteryid", this.lotteryid);
          localHashMap.put("memberid", this.memberId);
          localHashMap.put("playid", paramInt);
          localHashMap.put("ruleid", paramString1);
          localHashMap.put("roomid", this.roomId);
          localHashMap.put("issue", this.currentIssue);
          localHashMap.put("Odds", paramString2);
          localHashMap.put("buytype", "3");
          localHashMap.put("betstr", paramString3 + "," + paramString1 + "," + paramString2 + "," + paramString4);
          localHashMap.put("money", paramString4);
          RequestNet.get(this.context, AppConstants.URL_BETTING_ORDER, localHashMap, new StringCallback()
          {
            public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
            {
              RoomPrimaryActivity.this.setTouzhuBut();
              RoomPrimaryActivity.this.gentouDialog.dismiss();
              if ((RoomPrimaryActivity.this.popupWindowTouzhu != null) && (RoomPrimaryActivity.this.popupWindowTouzhu.isShowing()))
                RoomPrimaryActivity.this.popupWindowTouzhu.dismiss();
              RoomPrimaryActivity.this.closeWindowSoftInput(RoomPrimaryActivity.this.edit_jine);
              LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,touzhu-result:" + paramAnonymousException);
            }

            public void onResponse(String paramAnonymousString)
            {
              RoomPrimaryActivity.this.gentouDialog.dismiss();
              RoomPrimaryActivity.this.setTouzhuBut();
              if ((RoomPrimaryActivity.this.popupWindowTouzhu != null) && (RoomPrimaryActivity.this.popupWindowTouzhu.isShowing()))
                RoomPrimaryActivity.this.popupWindowTouzhu.dismiss();
              RoomPrimaryActivity.this.closeWindowSoftInput(RoomPrimaryActivity.this.edit_jine);
              LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
              if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
                LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
              TouzhuBean localTouzhuBean;
              do
              {
                return;
                Gson localGson = new Gson();
                try
                {
                  localTouzhuBean = (TouzhuBean)localGson.fromJson(paramAnonymousString, TouzhuBean.class);
                  if (localTouzhuBean == null)
                  {
                    LogUtils.e(RoomPrimaryActivity.this.TAG, "getCurrSecond-touzhuBean == null，获取失败");
                    return;
                  }
                }
                catch (Exception localException)
                {
                  while (true)
                  {
                    localException.printStackTrace();
                    localTouzhuBean = null;
                  }
                  if (localTouzhuBean.getFlag() == -4)
                  {
                    RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                    return;
                  }
                  if (localTouzhuBean.getFlag() == 0)
                  {
                    if (localTouzhuBean.getLeftmoney() != null)
                    {
                      String str9 = localTouzhuBean.getLeftmoney();
                      LogUtils.d("获取成功", "投注接口返回的余额" + str9);
                      RoomPrimaryActivity.this.userAmount = str9;
                    }
                    try
                    {
                      double d2 = Double.parseDouble(RoomPrimaryActivity.this.userAmount);
                      RoomPrimaryActivity.this.txt_money_left.setText(UiUtil.savePoint(d2, 2) + "元宝");
                      RoomPrimaryActivity.this.myDialog1.setMessage(localTouzhuBean.getMsg());
                      RoomPrimaryActivity.this.myDialog1.show();
                      Button localButton = RoomPrimaryActivity.this.myDialog1.btn_confirm;
                      View.OnClickListener local1 = new View.OnClickListener()
                      {
                        public void onClick(View paramAnonymous2View)
                        {
                          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
                            RoomPrimaryActivity.this.myDialog1.dismiss();
                        }
                      };
                      localButton.setOnClickListener(local1);
                      return;
                    }
                    catch (NumberFormatException localNumberFormatException2)
                    {
                      while (true)
                        localNumberFormatException2.printStackTrace();
                    }
                  }
                  if (localTouzhuBean.getFlag() == -2)
                  {
                    RoomPrimaryActivity.this.showDownWireDialog();
                    return;
                  }
                  if (localTouzhuBean.getFlag() == -3)
                  {
                    RoomPrimaryActivity.this.ShowFengjinDialog();
                    return;
                  }
                }
              }
              while (localTouzhuBean.getFlag() != 1);
              LogUtils.d(RoomPrimaryActivity.this.TAG, "投注成功");
              if (localTouzhuBean.getLeftmoney() != null)
              {
                String str8 = localTouzhuBean.getLeftmoney();
                LogUtils.d("获取成功", "投注接口返回的余额" + str8);
                RoomPrimaryActivity.this.userAmount = str8;
              }
              try
              {
                double d1 = Double.parseDouble(RoomPrimaryActivity.this.userAmount);
                RoomPrimaryActivity.this.txt_money_left.setText(UiUtil.savePoint(d1, 2) + "元宝");
                String str1 = RoomPrimaryActivity.this.currentIssue;
                String str2 = paramString3;
                String str3 = paramString4;
                String str4 = paramInt;
                String str5 = paramString2;
                String str6 = paramString1;
                String str7 = str1 + "@" + str2 + "@" + str3 + "@" + str4 + "@" + str5 + "@" + str6 + "@" + RoomPrimaryActivity.this.USERNAME;
                LogUtils.i(RoomPrimaryActivity.this.TAG, "sendTouzhuToXmpp()-body:" + str7);
                ChatMsgEntity localChatMsgEntity = new ChatMsgEntity();
                localChatMsgEntity.setBody(str7);
                localChatMsgEntity.setMessagetype("2");
                localChatMsgEntity.setMemberid(RoomPrimaryActivity.this.memberId);
                localChatMsgEntity.setComMsg(1);
                localChatMsgEntity.setNickname(RoomPrimaryActivity.this.nickName);
                localChatMsgEntity.setPicurl(RoomPrimaryActivity.this.userLogo);
                localChatMsgEntity.setSendtime(DateUtil.getNowTime());
                localChatMsgEntity.setComMsg(1);
                RoomPrimaryActivity.this.groupData.add(localChatMsgEntity);
                RoomPrimaryActivity.this.isRepeatMsg = false;
                localChatMsgEntity.setIsSendMsgRepeat(1);
                RoomPrimaryActivity.this.refeshChatListView();
                return;
              }
              catch (NumberFormatException localNumberFormatException1)
              {
                while (true)
                  localNumberFormatException1.printStackTrace();
              }
            }
          });
          return;
        }
        j = (int)d3;
      }
      while (j <= (int)this.singlebet);
      this.myDialog1.setMessage("单笔投注金额不能大于" + (int)this.singlebet + "元宝");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
    }
  }

  private void init()
  {
    initTouzhuView();
    this.tv_earn_money = ((TextView)this.contentView.findViewById(2131099960));
    this.iv_arrow = ((TextView)this.contentView.findViewById(2131099949));
    this.tv_earn_money.setVisibility(4);
    this.iv_arrow.setVisibility(4);
    this.btn_touzhu1 = ((Button)this.viewTouzhu.findViewById(2131100257));
    this.screenHeight = CustomApplication.app.displayMetrics.heightPixels;
    this.keyHeight = (this.screenHeight / 3);
    this.myDialog1 = new MyDialog1(this.context);
    this.myDialogCancelAndOk = new MyDialogCancelAndOk(this.context);
    this.groupData = new ArrayList();
    this.gentouDialog = new OkAndCanleDialog(this.context);
    this.dialogyuECharge = new MyDialogYuECharge(this.context);
    this.myOddsPopuWindow = new MyOddsPopuWindow(this.context, this.parentid);
    this.newMyOddsPopuWindow = new NewMyOddsPopuWindow(this.context, this.parentid, this.room_level);
    this.myDialogForbidBibi = new MyDialogForbidBibi(this.context);
    this.myDialogForbidBibi.setOnButtonGroupClick(new MyDialogForbidBibi.MyDialogListener()
    {
      public void onClick(View paramAnonymousView)
      {
        switch (paramAnonymousView.getId())
        {
        case 2131100065:
        default:
          return;
        case 2131100066:
          RoomPrimaryActivity.this.myDialogForbidBibi.dismiss();
          return;
        case 2131100064:
          RoomPrimaryActivity.this.setUserNobibiState(RoomPrimaryActivity.this.itemChatMsgEntity);
          RoomPrimaryActivity.this.myDialogForbidBibi.dismiss();
          return;
        case 2131100067:
        }
        String str = RoomPrimaryActivity.this.itemChatMsgEntity.getNickname();
        RoomPrimaryActivity.this.myDialogCancelAndOk.show();
        RoomPrimaryActivity.this.myDialogCancelAndOk.setMessage("确定要封禁" + str + "用户吗？");
        RoomPrimaryActivity.this.myDialogCancelAndOk.btn_cancle.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymous2View)
          {
            RoomPrimaryActivity.this.myDialogCancelAndOk.dismiss();
          }
        });
        RoomPrimaryActivity.this.myDialogCancelAndOk.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymous2View)
          {
            RoomPrimaryActivity.this.fengJinUserCount(RoomPrimaryActivity.this.itemChatMsgEntity);
            RoomPrimaryActivity.this.myDialogCancelAndOk.dismiss();
            RoomPrimaryActivity.this.myDialogForbidBibi.dismiss();
          }
        });
      }
    });
    this.edit_shuru = ((FaceEditText)this.contentView.findViewById(2131100028));
    this.edit_shuru.setOnKeyListener(this.onKey);
    this.edit_shuru.setOnFocusChangeListener(this.onFocusChangeListener);
    this.lin_0 = ((LinearLayout)this.contentView.findViewById(2131099895));
    this.lin_0.setVisibility(8);
    this.tv_game_time = ((TextView)this.contentView.findViewById(2131099950));
    this.tv_game_time.setVisibility(8);
    this.txt_current_issue = ((TextView)this.contentView.findViewById(2131099944));
    this.txt_current_issue.setText("?");
    this.txt_time_left = ((TextView)this.contentView.findViewById(2131099945));
    this.txt_money_left = ((TextView)this.contentView.findViewById(2131099926));
    findViewById(2131100348).setVisibility(8);
    this.txt_pre_issue = ((TextView)this.contentView.findViewById(2131099952));
    this.txt_pre_issue.setText("?");
    this.txt_pre_issue_no = ((TextView)this.contentView.findViewById(2131099953));
    this.txt_pre_issue_no.setText("? + ? + ? = ?  (类型)");
    this.txt_pre_issue_no.setOnClickListener(this);
    this.lin_nearly_ten = ((LinearLayout)this.contentView.findViewById(2131099954));
    this.lin_nearly_ten.setOnClickListener(this);
    this.lin_user_amount = ((RelativeLayout)this.contentView.findViewById(2131099947));
    this.lin_user_amount.setOnClickListener(this);
    this.list_group_chat = ((ListView)this.contentView.findViewById(2131099959));
    this.list_group_chat.setOnScrollListener(this.onScrollListener);
    this.img_xiala = ((ImageView)this.contentView.findViewById(2131099956));
    this.img_xiala.setOnClickListener(this);
    this.img_touzhu = ((ImageView)this.contentView.findViewById(2131100027));
    this.img_touzhu.setOnClickListener(this);
    this.img_biaoqing = ((ImageView)this.contentView.findViewById(2131100029));
    this.img_biaoqing.setOnClickListener(this);
    this.img_fasong = ((ImageView)this.contentView.findViewById(2131100036));
    this.img_fasong.setOnClickListener(this);
    this.img_face = ((ImageView)this.contentView.findViewById(2131100034));
    this.img_face.setOnClickListener(this);
    this.img_emoji = ((ImageView)this.contentView.findViewById(2131100035));
    this.img_emoji.setOnClickListener(this);
    this.tv_jinji_tongzhi = ((AlwaysMarqueeTextView)this.contentView.findViewById(2131099958));
    this.tv_jinji_tongzhi.setVisibility(8);
    if (this.groupchatMsgViewAdpater == null)
    {
      this.groupchatMsgViewAdpater = new GroupChatMsgViewAdpater(this.context, this.groupData, this.mItemClickHandler);
      this.list_group_chat.setAdapter(this.groupchatMsgViewAdpater);
    }
    setTitle(8, 0, 2130837809, "", 0, 8, 0, 2130837626, true);
    this.rel_root = ((RelativeLayout)this.contentView.findViewById(2131099941));
    initEmojiBar();
    initUserDatas();
    getTopTenChats();
    registerNetReceiver();
  }

  private void initEmoji()
  {
    this.img_face.setBackgroundColor(0);
    this.img_emoji.setBackgroundColor(-2894893);
    this.viewPagerFace.setVisibility(8);
    this.vp_emoji.setVisibility(0);
    this.layoutDotsFace.removeAllViews();
    this.emojifragments = new ArrayList();
    List localList = FaceUtil.getFaceList(this.context, "xiaozhu_default_string");
    int j = localList.size();
    LogUtils.i(this.TAG, "allSize" + j);
    ArrayList localArrayList = new ArrayList();
    for (int k = 0; ; k++)
    {
      if (k >= localList.size())
      {
        EmojiPagerAdapter localEmojiPagerAdapter = new EmojiPagerAdapter(getSupportFragmentManager());
        this.vp_emoji.setAdapter(localEmojiPagerAdapter);
        LogUtils.i(this.TAG, "更新adapter" + localEmojiPagerAdapter.getCount());
        this.vp_emoji.setOnPageChangeListener(new ViewPager.OnPageChangeListener()
        {
          public void onPageScrollStateChanged(int paramAnonymousInt)
          {
          }

          public void onPageScrolled(int paramAnonymousInt1, float paramAnonymousFloat, int paramAnonymousInt2)
          {
          }

          public void onPageSelected(int paramAnonymousInt)
          {
          }
        });
        return;
      }
      localArrayList.add((FaceBean)localList.get(k));
      if ((localArrayList.size() == 8) || (k == -1 + localList.size()))
      {
        EmojiFragment localEmojiFragment = new EmojiFragment();
        localEmojiFragment.setFaces(localArrayList);
        localEmojiFragment.setHandler(this.emojiHandler);
        this.emojifragments.add(localEmojiFragment);
        LogUtils.i(this.TAG, "创建一个图片gradview=" + localArrayList.size());
        localArrayList = new ArrayList();
      }
    }
  }

  private void initEmojiBar()
  {
    this.viewPagerFace = ((ViewPager)findViewById(2131100031));
    this.vp_emoji = ((ViewPager)findViewById(2131100032));
    ViewGroup.LayoutParams localLayoutParams = this.viewPagerFace.getLayoutParams();
    localLayoutParams.height = (1 * this.screenHeight / 3);
    this.viewPagerFace.setLayoutParams(localLayoutParams);
    this.vp_emoji.setLayoutParams(localLayoutParams);
    this.lin_face = ((LinearLayout)findViewById(2131100030));
    this.lin_face.setVisibility(8);
    this.layoutDotsFace = ((RadioGroup)findViewById(2131100033));
    this.layoutDotsFace.setVisibility(0);
  }

  private void initFace()
  {
    this.img_face.setBackgroundColor(-2894893);
    this.img_emoji.setBackgroundColor(0);
    this.vp_emoji.setVisibility(8);
    this.viewPagerFace.setVisibility(0);
    this.layoutDotsFace.removeAllViews();
    this.fragments = new ArrayList();
    List localList1 = FaceUtil.getFaceList(this.context, "face_default_string");
    int j = 0;
    if (localList1 != null)
    {
      if (localList1.size() % 27 != 0)
        break label153;
      j = localList1.size() / 27;
    }
    for (int k = 0; ; k++)
    {
      if (k >= j)
      {
        ViewPagerAdapter localViewPagerAdapter = new ViewPagerAdapter(getSupportFragmentManager());
        this.viewPagerFace.setAdapter(localViewPagerAdapter);
        this.viewPagerFace.setOnPageChangeListener(new ViewPager.OnPageChangeListener()
        {
          public void onPageScrollStateChanged(int paramAnonymousInt)
          {
          }

          public void onPageScrolled(int paramAnonymousInt1, float paramAnonymousFloat, int paramAnonymousInt2)
          {
          }

          public void onPageSelected(int paramAnonymousInt)
          {
            ((RadioButton)RoomPrimaryActivity.this.layoutDotsFace.getChildAt(paramAnonymousInt)).setChecked(true);
          }
        });
        ((RadioButton)this.layoutDotsFace.getChildAt(0)).setChecked(true);
        return;
        label153: j = 1 + localList1.size() / 27;
        break;
      }
      new ArrayList();
      int m = 27 * (k + 1);
      if (k == j - 1)
        m = localList1.size();
      List localList2 = localList1.subList(k * 27, m);
      ArrayList localArrayList = new ArrayList();
      localArrayList.addAll(localList2);
      FaceBean localFaceBean = new FaceBean();
      localFaceBean.setKey("[DELETE_ICON]");
      localFaceBean.setImageName("face_delete");
      localArrayList.add(localFaceBean);
      if ((localList2 != null) && (localList2.size() > 1))
      {
        FaceFragment localFaceFragment = new FaceFragment();
        localFaceFragment.setFaces(localArrayList);
        localFaceFragment.setHandler(this.faceHandler);
        this.fragments.add(localFaceFragment);
      }
      this.layoutDotsFace.addView(createRadioButton());
    }
  }

  private void initTouzhuView()
  {
    this.viewTouzhu = LayoutInflater.from(this.context).inflate(2130903183, null);
    this.rel_content = ((RelativeLayout)this.viewTouzhu.findViewById(2131100065));
    this.viewDaXiaoDanS = LayoutInflater.from(this.context).inflate(2130903180, null);
    this.viewCaiShuZ = LayoutInflater.from(this.context).inflate(2130903179, null);
    this.viewTeShuWanF = LayoutInflater.from(this.context).inflate(2130903184, null);
    this.tv_introduce_daxiao = ((TextView)this.viewDaXiaoDanS.findViewById(2131100240));
    this.gv_daxiaodans = ((GridView)this.viewDaXiaoDanS.findViewById(2131100241));
    this.gv_daxiaodans.setOnItemClickListener(this.onItemClickListenerDaxiaoSD);
    this.tv_introduce_cai = ((TextView)this.viewCaiShuZ.findViewById(2131100238));
    this.gv_caishuzi = ((GridView)this.viewCaiShuZ.findViewById(2131100239));
    this.gv_caishuzi.setOnItemClickListener(this.onItemClickListenerCaishuzi);
    this.tv_introduce_teshu = ((TextView)this.viewTeShuWanF.findViewById(2131100258));
    this.gv_teshuwanf = ((GridView)this.viewTeShuWanF.findViewById(2131100259));
    this.gv_teshuwanf.setOnItemClickListener(this.onItemClickListenerTeShuWF);
    this.ruleBaseBeansCai = new ArrayList();
    this.ruleBaseBeansDa = new ArrayList();
    this.ruleBaseBeansTe = new ArrayList();
    if (this.views.size() != 0)
      this.views.clear();
    this.views.add(this.viewDaXiaoDanS);
    this.views.add(this.viewCaiShuZ);
    this.views.add(this.viewTeShuWanF);
    if (this.daxiaodanSGridViewAdapter == null)
    {
      this.daxiaodanSGridViewAdapter = new DaxiaodanSGridViewAdapter(this.context, this.ruleBaseBeansDa, "");
      this.gv_daxiaodans.setAdapter(this.daxiaodanSGridViewAdapter);
    }
    if (this.caishuziGridViewAdapter == null)
    {
      this.caishuziGridViewAdapter = new CaishuziGridViewAdapter(this.context, this.ruleBaseBeansCai, "");
      this.gv_caishuzi.setAdapter(this.caishuziGridViewAdapter);
    }
    if (this.teshuWanFGridViewAdapter == null)
    {
      this.teshuWanFGridViewAdapter = new TeshuWanFGridViewAdapter(this.context, this.ruleBaseBeansTe, "");
      this.gv_teshuwanf.setAdapter(this.teshuWanFGridViewAdapter);
    }
  }

  private void initUserDatas()
  {
    if (CustomApplication.app.userBaseBean != null)
    {
      this.nickName = CustomApplication.app.userBaseBean.getNick_name();
      CustomApplication.app.userBaseBean.getSignature();
      this.userLogo = CustomApplication.app.userBaseBean.getUser_logo();
      this.memberId = CustomApplication.app.userBaseBean.getMemberid();
      this.guid = CustomApplication.app.userBaseBean.getGuid();
    }
  }

  private void refeshChatListView()
  {
    runOnUiThread(this.refeshRunnable);
  }

  private void registerNetReceiver()
  {
    this.receiverNet = new MyReceiver();
    IntentFilter localIntentFilter = new IntentFilter();
    localIntentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
    localIntentFilter.setPriority(1000);
    registerReceiver(this.receiverNet, localIntentFilter);
    LogUtils.d(this.TAG, "【聊天室-网络监听】广播已经注册");
  }

  private void sendMsg()
  {
    if (!CustomApplication.app.isNetConnect)
    {
      UiUtil.showToast(this.context, "请检查您的网络");
      return;
    }
    if (!this.isDebug);
    for (String str = this.edit_shuru.getText().toString(); ; str = this.groupchatMsgViewAdpater.data.size() + "[哭笑]")
    {
      LogUtils.e(this.TAG, "发送聊天消息text:" + str);
      if (!TextUtils.isEmpty(str.trim()))
        break;
      UiUtil.showToast(this.context, "消息不能为空哟");
      this.edit_shuru.setText("");
      return;
    }
    if (1 == this.userNoBibiState)
    {
      UiUtil.showToast(this.context, "您已被禁言");
      return;
    }
    ChatMsgEntity localChatMsgEntity = new ChatMsgEntity();
    localChatMsgEntity.setBody(str);
    localChatMsgEntity.setMessagetype("1");
    localChatMsgEntity.setComMsg(1);
    localChatMsgEntity.setPicurl(this.userLogo);
    localChatMsgEntity.setNickname(this.nickName);
    localChatMsgEntity.setUser_name(this.USERNAME);
    localChatMsgEntity.setSendtime(DateUtil.getNowTime());
    org.jivesoftware.smack.packet.Message localMessage = new org.jivesoftware.smack.packet.Message(this.roomId + "@" + HOST, Message.Type.groupchat);
    localMessage.setMessagetype("1");
    localMessage.setMemberid(this.memberId);
    localMessage.setRoomid(this.roomId);
    localMessage.setMessagedirect("1");
    localMessage.setBody(str);
    localMessage.setFrom(this.USERNAME + "@" + HOST);
    try
    {
      if (this.connection != null)
      {
        if (this.connection.isConnected())
        {
          this.connection.sendPacket(localMessage);
          localChatMsgEntity.setIsSendMsg(1);
          LogUtils.e(this.TAG, "发送XMPP消息成功：" + str);
        }
        while (true)
        {
          this.groupData.add(localChatMsgEntity);
          this.edit_shuru.setText("");
          this.isRepeatMsg = false;
          localChatMsgEntity.setIsSendMsgRepeat(1);
          localChatMsgEntity.setUsergrade(this.myGrade);
          refeshChatListView();
          return;
          connectToXmpp();
          localChatMsgEntity.setIsSendMsg(0);
          LogUtils.e(this.TAG, "not connected to server!");
        }
      }
    }
    catch (Exception localException)
    {
      while (true)
      {
        LogUtils.e(this.TAG, "发送失败");
        localException.printStackTrace();
        localChatMsgEntity.setIsSendMsg(0);
        continue;
        connectToXmpp();
        localChatMsgEntity.setIsSendMsg(0);
      }
    }
  }

  private void sendMsg(String paramString)
  {
    LogUtils.d(this.TAG, "发送动态表情");
    if (!CustomApplication.app.isNetConnect)
    {
      UiUtil.showToast(this.context, "请检查您的网络");
      return;
    }
    if (1 == this.userNoBibiState)
    {
      UiUtil.showToast(this.context, "您已被禁言");
      return;
    }
    org.jivesoftware.smack.packet.Message localMessage = new org.jivesoftware.smack.packet.Message(this.roomId + "@" + HOST, Message.Type.groupchat);
    localMessage.setMessagetype("3");
    localMessage.setMemberid(this.memberId);
    localMessage.setRoomid(this.roomId);
    localMessage.setMessagedirect("1");
    localMessage.setBody(paramString);
    localMessage.setFrom(this.USERNAME + "@" + HOST);
    localMessage.addBody("messagetype", "3");
    try
    {
      if (this.connection == null)
      {
        LogUtils.e(this.TAG, "connection = null");
        this.myDialogCancelAndOk.setMessage("聊天连接失败，确认是否重连");
        this.myDialogCancelAndOk.show();
        this.myDialogCancelAndOk.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymousView)
          {
            RoomPrimaryActivity.this.myDialogCancelAndOk.dismiss();
            RoomPrimaryActivity.this.connectToXmpp();
          }
        });
        return;
      }
    }
    catch (Exception localException)
    {
      LogUtils.e(this.TAG, "发送失败");
      localException.printStackTrace();
      return;
    }
    this.connection.sendPacket(localMessage);
    LogUtils.d(this.TAG, "发送XMPP动态表情消息成功：" + paramString);
    ChatMsgEntity localChatMsgEntity = new ChatMsgEntity();
    localChatMsgEntity.setBody(paramString);
    localChatMsgEntity.setMessagetype("3");
    localChatMsgEntity.setComMsg(1);
    localChatMsgEntity.setUser_name(this.USERNAME);
    localChatMsgEntity.setPicurl(this.userLogo);
    localChatMsgEntity.setNickname(this.nickName);
    localChatMsgEntity.setSendtime(DateUtil.getNowTime());
    localChatMsgEntity.setUsergrade(this.myGrade);
    this.groupData.add(localChatMsgEntity);
    this.edit_shuru.setText("");
    closeWindowSoftInput(this.edit_shuru);
    this.isRepeatMsg = false;
    localChatMsgEntity.setIsSendMsgRepeat(1);
    refeshChatListView();
  }

  private void sendMsgRePeat(ChatMsgEntity paramChatMsgEntity)
  {
    if (!CustomApplication.app.isNetConnect)
    {
      UiUtil.showToast(this.context, "请检查您的网络");
      return;
    }
    if (paramChatMsgEntity == null)
    {
      LogUtils.e(this.TAG, "重发聊天消息model==null");
      return;
    }
    String str = paramChatMsgEntity.getBody();
    LogUtils.e(this.TAG, "重发聊天消息text:" + str);
    if (1 == this.userNoBibiState)
    {
      UiUtil.showToast(this.context, "您已被禁言");
      return;
    }
    org.jivesoftware.smack.packet.Message localMessage = new org.jivesoftware.smack.packet.Message(this.roomId + "@" + HOST, Message.Type.groupchat);
    localMessage.setMessagetype("1");
    localMessage.setMemberid(this.memberId);
    localMessage.setRoomid(this.roomId);
    localMessage.setMessagedirect("1");
    localMessage.setBody(str);
    localMessage.setFrom(this.USERNAME + "@" + HOST);
    try
    {
      if (this.connection == null)
        connectToXmpp();
      if (this.connection != null)
      {
        this.connection.sendPacket(localMessage);
        paramChatMsgEntity.setIsSendMsg(1);
        LogUtils.d(this.TAG, "发送XMPP消息成功：" + str);
      }
      this.isRepeatMsg = true;
      paramChatMsgEntity.setIsSendMsgRepeat(0);
      j = 0;
      if (j >= this.groupData.size())
      {
        refeshChatListView();
        delay(paramChatMsgEntity);
        return;
      }
    }
    catch (Exception localException)
    {
      while (true)
      {
        int j;
        LogUtils.e(this.TAG, "发送失败");
        localException.printStackTrace();
        paramChatMsgEntity.setIsSendMsg(0);
        continue;
        ChatMsgEntity localChatMsgEntity = (ChatMsgEntity)this.groupData.get(j);
        if (localChatMsgEntity == null);
        while (paramChatMsgEntity != localChatMsgEntity)
        {
          j++;
          break;
        }
        this.groupData.set(j, paramChatMsgEntity);
      }
    }
  }

  private void sendNobibiMsg(ChatMsgEntity paramChatMsgEntity)
  {
    LogUtils.d(this.TAG, "发送禁言消息/封禁账号消息");
    String str = "";
    if (paramChatMsgEntity != null)
    {
      str = paramChatMsgEntity.getMemberid();
      paramChatMsgEntity.getNickname();
    }
    while (true)
    {
      org.jivesoftware.smack.packet.Message localMessage = new org.jivesoftware.smack.packet.Message(this.roomId + "@" + HOST, Message.Type.groupchat);
      localMessage.setMessagetype("5");
      localMessage.setMemberid(str);
      localMessage.setRoomid(this.roomId);
      localMessage.setMessagedirect("1");
      localMessage.setBody(this.bodyStr);
      localMessage.setFrom(this.USERNAME + "@" + HOST);
      try
      {
        this.connection.sendPacket(localMessage);
        LogUtils.i(this.TAG, "发送禁言消息成功:" + this.bodyStr);
        return;
        LogUtils.e(this.TAG, "itemChatMsgEntity == null");
      }
      catch (Exception localException)
      {
        LogUtils.e(this.TAG, "发送禁言消息失败");
        localException.printStackTrace();
      }
    }
  }

  private void sendTouzhuRemindMsg(String paramString)
  {
    ChatMsgEntity localChatMsgEntity = new ChatMsgEntity();
    localChatMsgEntity.setBody(paramString);
    localChatMsgEntity.setMessagetype("4");
    localChatMsgEntity.setComMsg(4);
    localChatMsgEntity.setPicurl("");
    localChatMsgEntity.setNickname("系统提示");
    localChatMsgEntity.setSendtime(DateUtil.getNowTime());
    this.groupData.add(localChatMsgEntity);
    this.isRepeatMsg = false;
    localChatMsgEntity.setIsSendMsgRepeat(1);
    refeshChatListView();
  }

  private void setAdapterDatas()
  {
    final int j;
    ChatMsgEntity localChatMsgEntity;
    if (this.groupchatMsgViewAdpater != null)
    {
      this.groupchatMsgViewAdpater.setData(this.groupData);
      this.groupchatMsgViewAdpater.setCount(this.groupData.size());
      this.list_group_chat.requestLayout();
      this.groupchatMsgViewAdpater.notifyDataSetChanged();
      j = this.groupchatMsgViewAdpater.getCount();
      if ((this.groupData != null) && (this.groupData.size() != 0))
      {
        localChatMsgEntity = (ChatMsgEntity)this.groupData.get(-1 + this.groupData.size());
        if (localChatMsgEntity != null)
        {
          if (localChatMsgEntity.isComMsg() != 0)
            break label141;
          if (this.isScrollLastRoll)
          {
            this.list_group_chat.post(new Runnable()
            {
              public void run()
              {
                RoomPrimaryActivity.this.list_group_chat.setSelection(-1 + j);
              }
            });
            this.list_group_chat.setSelection(this.list_group_chat.getBottom());
          }
        }
      }
    }
    label141: 
    do
    {
      return;
      if (this.isRepeatMsg)
        break;
    }
    while ((!this.isScrollLastRoll) && (localChatMsgEntity.getMessagetype().equals("4")));
    this.list_group_chat.post(new Runnable()
    {
      public void run()
      {
        RoomPrimaryActivity.this.list_group_chat.setSelection(-1 + j);
      }
    });
    this.list_group_chat.setSelection(this.list_group_chat.getBottom());
    LogUtils.d(this.TAG, "isRepeatMsg：" + this.isRepeatMsg);
  }

  private void setGoTouzhuBtnIsEnable(boolean paramBoolean)
  {
    if (paramBoolean)
      this.btn_touzhu1.setBackgroundResource(2130837551);
    while (true)
    {
      this.btn_touzhu1.setEnabled(paramBoolean);
      return;
      this.btn_touzhu1.setBackgroundResource(2130837686);
      RequestNet.cancelTag(this.context);
    }
  }

  private void setLinFaceIsVisible()
  {
    if (this.lin_face.getVisibility() == 0)
    {
      this.lin_face.setVisibility(8);
      return;
    }
    this.lin_face.setVisibility(0);
  }

  private void setNobibiStateByServerTime()
  {
    if (this.userNoBibiEndTime != null)
      try
      {
        long l1 = this.serverDate.getTime() / 1000L;
        long l2 = Long.parseLong(this.userNoBibiEndTime);
        LogUtils.i(this.TAG, "serverTime:" + l1);
        LogUtils.i(this.TAG, "nobibiEndTime:" + l2);
        if (l1 < l2)
        {
          this.userNoBibiState = 1;
          return;
        }
        this.userNoBibiState = 0;
        return;
      }
      catch (NumberFormatException localNumberFormatException)
      {
        localNumberFormatException.printStackTrace();
      }
  }

  private void setTouzhuBut()
  {
    if (this.mIsGenTou)
    {
      this.mIsGenTou = false;
      setgentouSureBtnIsEnable(true);
    }
    if (this.mIsNormalTou)
    {
      this.mIsNormalTou = false;
      setGoTouzhuBtnIsEnable(true);
    }
  }

  private void setUserNobibiState(final ChatMsgEntity paramChatMsgEntity)
  {
    String str1 = "";
    int j = -1;
    String str2 = "";
    label116: String str3;
    if (paramChatMsgEntity != null)
    {
      str1 = paramChatMsgEntity.getMemberid();
      str2 = paramChatMsgEntity.getNickname();
      if (this.myDialogForbidBibi == null)
        break label395;
      j = this.myDialogForbidBibi.getForbidBibiType();
      this.banForbidReason = this.myDialogForbidBibi.getForbidBibiReason();
      LogUtils.i(this.TAG, "forbidBibiType:" + j);
      LogUtils.i(this.TAG, "forbidReason:" + this.banForbidReason);
      str3 = "";
      switch (j)
      {
      default:
      case 0:
      case 1:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      if ("".equals(this.banForbidReason))
        this.banForbidReason = "无";
      this.bodyStr = (str2 + "，已被房间管理员禁言，时长" + str3 + "，禁言理由：" + this.banForbidReason);
      HashMap localHashMap = new HashMap();
      localHashMap.put("memberid", this.memberId);
      localHashMap.put("banMemberid", str1);
      localHashMap.put("banType", j);
      localHashMap.put("reason", this.banForbidReason);
      localHashMap.put("state", "1");
      LogUtils.d(this.TAG, "URL:" + AppConstants.URL_ROOM_SETROOMNOWORD);
      RequestNet.get(this.context, AppConstants.URL_ROOM_SETROOMNOWORD, localHashMap, new StringCallback()
      {
        public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "禁言失败,setUserNobibiState-result:" + paramAnonymousException);
        }

        public void onResponse(String paramAnonymousString)
        {
          LogUtils.d(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          if (paramAnonymousString.isEmpty());
          do
          {
            BaseDataObject localBaseDataObject;
            do
              while (true)
              {
                return;
                Gson localGson = new Gson();
                try
                {
                  localBaseDataObject = (BaseDataObject)localGson.fromJson(paramAnonymousString, BaseDataObject.class);
                  if (localBaseDataObject != null)
                    if (localBaseDataObject.getFlag() == -4)
                    {
                      RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                      return;
                    }
                }
                catch (Exception localException)
                {
                  while (true)
                  {
                    localException.printStackTrace();
                    localBaseDataObject = null;
                  }
                  if (localBaseDataObject.getFlag() == 0)
                  {
                    UiUtil.showToast(RoomPrimaryActivity.this.context, localBaseDataObject.getMsg());
                    return;
                  }
                  if (localBaseDataObject.getFlag() == -2)
                  {
                    RoomPrimaryActivity.this.showDownWireDialog();
                    return;
                  }
                  if (localBaseDataObject.getFlag() == -3)
                  {
                    RoomPrimaryActivity.this.ShowFengjinDialog();
                    return;
                  }
                }
              }
            while (localBaseDataObject.getFlag() != 1);
            LogUtils.i(RoomPrimaryActivity.this.TAG, "禁言成功");
            UiUtil.showToast(RoomPrimaryActivity.this.context, "禁言成功");
            RoomPrimaryActivity.this.sendNobibiMsg(paramChatMsgEntity);
          }
          while (RoomPrimaryActivity.this.myDialogForbidBibi == null);
          RoomPrimaryActivity.this.myDialogForbidBibi.dismiss();
        }
      });
      return;
      LogUtils.e(this.TAG, "itemChatMsgEntity == null");
      break;
      label395: LogUtils.e(this.TAG, "myDialogForbidBibi == null");
      break label116;
      str3 = "一小时";
      continue;
      str3 = "一天";
      continue;
      str3 = "一个月";
      continue;
      str3 = "一年";
    }
  }

  private void setgentouSureBtnIsEnable(boolean paramBoolean)
  {
    if (paramBoolean)
      this.gentouDialog.btn_confirm.setBackgroundResource(2130838280);
    while (true)
    {
      this.gentouDialog.btn_confirm.setEnabled(paramBoolean);
      return;
      this.gentouDialog.btn_confirm.setBackgroundResource(2130838005);
    }
  }

  private void showPopwindow()
  {
    ((LayoutInflater)getSystemService("layout_inflater"));
    int j = CustomApplication.app.displayMetrics.widthPixels;
    if (this.popupWindowKaijiang == null)
      this.popupWindowKaijiang = new PopupWindow(this.viewNearlyTen, -2, -2, true);
    LinearLayout localLinearLayout = (LinearLayout)this.viewNearlyTen.findViewById(2131099762);
    ViewGroup.LayoutParams localLayoutParams = localLinearLayout.getLayoutParams();
    localLayoutParams.width = j;
    localLinearLayout.setLayoutParams(localLayoutParams);
    this.list_kaijiang = ((ListView)this.viewNearlyTen.findViewById(2131100178));
    if (this.kaijiangListAdapter == null)
    {
      this.kaijiangListAdapter = new KaijiangListAdapter(this.context, this.issueListBaseBeanList, "");
      this.list_kaijiang.setAdapter(this.kaijiangListAdapter);
      this.kaijiangListAdapter.notifyDataSetChanged();
    }
    getNearlyIssueResultList();
    ((LinearLayout)this.viewNearlyTen.findViewById(2131100177)).setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        RoomPrimaryActivity.this.popupWindowKaijiang.dismiss();
      }
    });
    this.popupWindowKaijiang.setFocusable(true);
    this.popupWindowKaijiang.setOutsideTouchable(true);
    this.popupWindowKaijiang.setBackgroundDrawable(this.context.getResources().getDrawable(2130837536));
    this.popupWindowKaijiang.showAsDropDown(this.img_xiala, 0, 0);
    this.popupWindowKaijiang.setOnDismissListener(new PopupWindow.OnDismissListener()
    {
      public void onDismiss()
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "popWindow消失");
        RoomPrimaryActivity.this.img_xiala.setImageDrawable(RoomPrimaryActivity.this.context.getResources().getDrawable(2130837689));
      }
    });
  }

  private void showPopwindowTouzhu()
  {
    if (this.popupWindowTouzhu == null)
    {
      this.rel_content = ((RelativeLayout)this.viewTouzhu.findViewById(2131100065));
      this.screenWidth = CustomApplication.app.displayMetrics.widthPixels;
      this.screenHeight = CustomApplication.app.displayMetrics.heightPixels;
      if (this.popupWindowTouzhu == null)
        this.popupWindowTouzhu = new PopupWindow(this.viewTouzhu, -1, -1, true);
      this.popupWindowTouzhu.setSoftInputMode(1);
      this.popupWindowTouzhu.setSoftInputMode(16);
      this.edit_jine = ((EditText)this.viewTouzhu.findViewById(2131100256));
      Button localButton1 = (Button)this.viewTouzhu.findViewById(2131100252);
      Button localButton2 = (Button)this.viewTouzhu.findViewById(2131100253);
      this.btn_min_touzhu = ((Button)this.viewTouzhu.findViewById(2131100254));
      this.btn_max_touzhu = ((Button)this.viewTouzhu.findViewById(2131100255));
      this.btn_touzhu1 = ((Button)this.viewTouzhu.findViewById(2131100257));
      localButton1.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.startActivityForResult(new Intent(RoomPrimaryActivity.this, ChongzhiActivity2.class), 0);
        }
      });
      localButton2.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.closeWindowSoftInput(RoomPrimaryActivity.this.edit_jine);
          RoomPrimaryActivity.this.newMyOddsPopuWindow.show(RoomPrimaryActivity.this.contentView);
        }
      });
      this.btn_touzhu1.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.setGoTouzhuBtnIsEnable(false);
          if (RoomPrimaryActivity.this.isKaijianging)
          {
            RoomPrimaryActivity.this.myDialog1.setMessage("已封盘，停止下注");
            RoomPrimaryActivity.this.myDialog1.show();
            RoomPrimaryActivity.this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
            {
              public void onClick(View paramAnonymous2View)
              {
                if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
                  RoomPrimaryActivity.this.myDialog1.dismiss();
              }
            });
            RoomPrimaryActivity.this.setGoTouzhuBtnIsEnable(true);
            return;
          }
          RoomPrimaryActivity.this.mTouzhuJine = RoomPrimaryActivity.this.edit_jine.getText().toString();
          switch (RoomPrimaryActivity.this.mCurrentPager)
          {
          default:
          case 0:
          case 1:
          case 2:
          }
          while (true)
          {
            RoomPrimaryActivity.this.mIsNormalTou = true;
            RoomPrimaryActivity.this.touzhuAction(RoomPrimaryActivity.this.mRoleId, RoomPrimaryActivity.this.mOdds, RoomPrimaryActivity.this.mRoleName, RoomPrimaryActivity.this.mTouzhuJine, RoomPrimaryActivity.this.mPlayStyleId);
            return;
            RoomPrimaryActivity.this.mPlayStyleId = RoomPrimaryActivity.this.getPlayStyleId(RoomPrimaryActivity.this.mCurrentPager);
            if ((RoomPrimaryActivity.this.ruleBaseBeansDa != null) && (RoomPrimaryActivity.this.ruleBaseBeansDa.size() != 0))
            {
              RuleBaseBean localRuleBaseBean3 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansDa.get(RoomPrimaryActivity.this.daxiaoDSPosition);
              RoomPrimaryActivity.this.mRoleId = localRuleBaseBean3.getId();
              RoomPrimaryActivity.this.mOdds = localRuleBaseBean3.getOdds();
              RoomPrimaryActivity.this.mRoleName = localRuleBaseBean3.getName();
              continue;
              RoomPrimaryActivity.this.mPlayStyleId = RoomPrimaryActivity.this.getPlayStyleId(RoomPrimaryActivity.this.mCurrentPager);
              if ((RoomPrimaryActivity.this.ruleBaseBeansCai != null) && (RoomPrimaryActivity.this.ruleBaseBeansCai.size() != 0))
              {
                RuleBaseBean localRuleBaseBean2 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansCai.get(RoomPrimaryActivity.this.caishuziPosition);
                RoomPrimaryActivity.this.mRoleId = localRuleBaseBean2.getId();
                RoomPrimaryActivity.this.mOdds = localRuleBaseBean2.getOdds();
                RoomPrimaryActivity.this.mRoleName = localRuleBaseBean2.getName();
                continue;
                RoomPrimaryActivity.this.mPlayStyleId = RoomPrimaryActivity.this.getPlayStyleId(RoomPrimaryActivity.this.mCurrentPager);
                if ((RoomPrimaryActivity.this.ruleBaseBeansTe != null) && (RoomPrimaryActivity.this.ruleBaseBeansTe.size() != 0))
                {
                  RuleBaseBean localRuleBaseBean1 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansTe.get(RoomPrimaryActivity.this.teshuWFPosition);
                  RoomPrimaryActivity.this.mRoleId = localRuleBaseBean1.getId();
                  RoomPrimaryActivity.this.mOdds = localRuleBaseBean1.getOdds();
                  RoomPrimaryActivity.this.mRoleName = localRuleBaseBean1.getName();
                }
              }
            }
          }
        }
      });
      this.btn_min_touzhu.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          try
          {
            double d = Double.parseDouble(RoomPrimaryActivity.this.userAmount);
            LogUtils.e(RoomPrimaryActivity.this.TAG, "userAmount:" + RoomPrimaryActivity.this.userAmount);
            if (d == 0.0D)
            {
              UiUtil.showToast(RoomPrimaryActivity.this.context, "余额不足,请充值");
              RoomPrimaryActivity.this.edit_jine.setText("0");
              return;
            }
            if (d < RoomPrimaryActivity.this.minsinglebe)
            {
              int i = (int)d;
              UiUtil.showToast(RoomPrimaryActivity.this.context, "余额不足");
              RoomPrimaryActivity.this.edit_jine.setText(i);
              return;
            }
          }
          catch (Exception localException)
          {
            localException.printStackTrace();
            return;
          }
          int j = (int)RoomPrimaryActivity.this.minsinglebe;
          RoomPrimaryActivity.this.edit_jine.setText(j);
        }
      });
      this.btn_max_touzhu.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.touzhuJine = RoomPrimaryActivity.this.edit_jine.getText().toString().trim();
          if (("".equals(RoomPrimaryActivity.this.touzhuJine)) || ("0".equals(RoomPrimaryActivity.this.touzhuJine)))
          {
            UiUtil.showToast(RoomPrimaryActivity.this.context, "请填写投注金额");
            return;
          }
          double d1;
          double d2;
          try
          {
            d1 = Double.parseDouble(RoomPrimaryActivity.this.userAmount);
            d2 = 2.0D * Double.parseDouble(RoomPrimaryActivity.this.touzhuJine);
            if (d2 <= RoomPrimaryActivity.this.singlebet)
              break label222;
            UiUtil.showToast(RoomPrimaryActivity.this.context, "单笔投注金额不能大于" + (int)RoomPrimaryActivity.this.singlebet + "元宝");
            if (d1 > RoomPrimaryActivity.this.singlebet)
            {
              RoomPrimaryActivity.this.edit_jine.setText((int)RoomPrimaryActivity.this.singlebet);
              return;
            }
          }
          catch (Exception localException)
          {
            localException.printStackTrace();
            return;
          }
          RoomPrimaryActivity.this.edit_jine.setText((int)d1);
          return;
          label222: if (d2 > d1)
          {
            LogUtils.e(RoomPrimaryActivity.this.TAG, "用户余额(整型):" + (int)d1);
            RoomPrimaryActivity.this.edit_jine.setText((int)d1);
            return;
          }
          int i = 2 * Integer.parseInt(RoomPrimaryActivity.this.touzhuJine);
          RoomPrimaryActivity.this.edit_jine.setText(i);
        }
      });
      final ViewPager localViewPager = (ViewPager)this.viewTouzhu.findViewById(2131100247);
      final TextView localTextView = (TextView)this.viewTouzhu.findViewById(2131100250);
      localTextView.setText("大小单双");
      final ImageView localImageView = (ImageView)this.viewTouzhu.findViewById(2131100249);
      localImageView.setImageDrawable(this.context.getResources().getDrawable(2130837662));
      ((ImageView)this.viewTouzhu.findViewById(2131100248)).setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
          localRoomPrimaryActivity.currentItem = (-1 + localRoomPrimaryActivity.currentItem);
          if (RoomPrimaryActivity.this.currentItem < 0)
            RoomPrimaryActivity.this.currentItem = RoomPrimaryActivity.this.views.size();
          localViewPager.setCurrentItem(RoomPrimaryActivity.this.currentItem);
        }
      });
      ((ImageView)this.viewTouzhu.findViewById(2131100251)).setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
          localRoomPrimaryActivity.currentItem = (1 + localRoomPrimaryActivity.currentItem);
          if (RoomPrimaryActivity.this.currentItem > RoomPrimaryActivity.this.views.size())
            RoomPrimaryActivity.this.currentItem = 0;
          localViewPager.setCurrentItem(RoomPrimaryActivity.this.currentItem);
        }
      });
      this.pagerAdapter = new TouzhuViewPagerAdapter(this.views, this.context);
      localViewPager.setAdapter(this.pagerAdapter);
      localViewPager.setCurrentItem(this.currentItem);
      localViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener()
      {
        public void onPageScrollStateChanged(int paramAnonymousInt)
        {
        }

        public void onPageScrolled(int paramAnonymousInt1, float paramAnonymousFloat, int paramAnonymousInt2)
        {
        }

        public void onPageSelected(int paramAnonymousInt)
        {
          RoomPrimaryActivity.this.mCurrentPager = paramAnonymousInt;
          switch (paramAnonymousInt)
          {
          default:
          case 0:
          case 1:
          case 2:
          }
          do
          {
            while (true)
            {
              RoomPrimaryActivity.this.currentItem = paramAnonymousInt;
              return;
              RoomPrimaryActivity.this.playStyleId = RoomPrimaryActivity.this.getPlayStyleId(paramAnonymousInt);
              if (RoomPrimaryActivity.this.ruleBaseBeansDa.size() == 0)
                RoomPrimaryActivity.this.getPlaytListRule(paramAnonymousInt, RoomPrimaryActivity.this.playStyleId);
              localTextView.setText("大小单双");
              localImageView.setImageResource(2130837662);
              RoomPrimaryActivity.this.rel_content.setBackgroundResource(2130837808);
              if ((RoomPrimaryActivity.this.ruleBaseBeansDa != null) && (RoomPrimaryActivity.this.ruleBaseBeansDa.size() != 0))
              {
                RuleBaseBean localRuleBaseBean3 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansDa.get(RoomPrimaryActivity.this.daxiaoDSPosition);
                String str3 = localRuleBaseBean3.getWinNumber();
                RoomPrimaryActivity.this.roleId = localRuleBaseBean3.getId();
                RoomPrimaryActivity.this.Odds = localRuleBaseBean3.getOdds();
                RoomPrimaryActivity.this.roleName = localRuleBaseBean3.getName();
                RoomPrimaryActivity.this.tv_introduce_daxiao.setText("中奖和值：" + str3);
                LogUtils.i(RoomPrimaryActivity.this.TAG, "modelDa.getPlayId:" + localRuleBaseBean3.getPlayId());
                continue;
                RoomPrimaryActivity.this.playStyleId = RoomPrimaryActivity.this.getPlayStyleId(paramAnonymousInt);
                if (RoomPrimaryActivity.this.ruleBaseBeansCai.size() == 0)
                  RoomPrimaryActivity.this.getPlaytListRule(paramAnonymousInt, RoomPrimaryActivity.this.playStyleId);
                localTextView.setText("猜数字");
                localImageView.setImageResource(2130837661);
                RoomPrimaryActivity.this.rel_content.setBackgroundResource(2130837807);
                if ((RoomPrimaryActivity.this.ruleBaseBeansCai != null) && (RoomPrimaryActivity.this.ruleBaseBeansCai.size() != 0))
                {
                  RuleBaseBean localRuleBaseBean2 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansCai.get(RoomPrimaryActivity.this.caishuziPosition);
                  RoomPrimaryActivity.this.roleId = localRuleBaseBean2.getId();
                  RoomPrimaryActivity.this.Odds = localRuleBaseBean2.getOdds();
                  RoomPrimaryActivity.this.roleName = localRuleBaseBean2.getName();
                  String str2 = localRuleBaseBean2.getWinNumber();
                  RoomPrimaryActivity.this.tv_introduce_cai.setText("中奖号码：" + str2);
                  LogUtils.i(RoomPrimaryActivity.this.TAG, "modelCai.getPlayId:" + localRuleBaseBean2.getPlayId());
                }
              }
            }
            RoomPrimaryActivity.this.playStyleId = RoomPrimaryActivity.this.getPlayStyleId(paramAnonymousInt);
            if (RoomPrimaryActivity.this.ruleBaseBeansTe.size() == 0)
              RoomPrimaryActivity.this.getPlaytListRule(paramAnonymousInt, RoomPrimaryActivity.this.playStyleId);
            localTextView.setText("特殊玩法");
            localImageView.setImageResource(2130837678);
            RoomPrimaryActivity.this.rel_content.setBackgroundResource(2130837816);
          }
          while ((RoomPrimaryActivity.this.ruleBaseBeansTe == null) || (RoomPrimaryActivity.this.ruleBaseBeansTe.size() == 0));
          RuleBaseBean localRuleBaseBean1 = (RuleBaseBean)RoomPrimaryActivity.this.ruleBaseBeansTe.get(RoomPrimaryActivity.this.teshuWFPosition);
          RoomPrimaryActivity.this.roleId = localRuleBaseBean1.getId();
          RoomPrimaryActivity.this.Odds = localRuleBaseBean1.getOdds();
          RoomPrimaryActivity.this.roleName = localRuleBaseBean1.getName();
          String str1 = localRuleBaseBean1.getWinNumber();
          if ("红".equals(RoomPrimaryActivity.this.roleName))
            RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str1);
          while (true)
          {
            LogUtils.i(RoomPrimaryActivity.this.TAG, "modelTeshu.getPlayId:" + localRuleBaseBean1.getPlayId());
            break;
            if ("绿".equals(RoomPrimaryActivity.this.roleName))
              RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str1);
            else if ("蓝".equals(RoomPrimaryActivity.this.roleName))
              RoomPrimaryActivity.this.tv_introduce_teshu.setText("中奖和值：" + str1);
            else if ("豹子".equals(RoomPrimaryActivity.this.roleName))
              RoomPrimaryActivity.this.tv_introduce_teshu.setText("三个数字一致即为中奖");
          }
        }
      });
      LinearLayout localLinearLayout = (LinearLayout)this.viewTouzhu.findViewById(2131100246);
      ViewGroup.LayoutParams localLayoutParams = this.rel_content.getLayoutParams();
      localLayoutParams.height = (4 * (this.screenHeight / 10));
      this.rel_content.setLayoutParams(localLayoutParams);
      ((LinearLayout)this.viewTouzhu.findViewById(2131100177));
      localLinearLayout.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.popupWindowTouzhu.dismiss();
        }
      });
      this.popupWindowTouzhu.setFocusable(true);
      this.popupWindowTouzhu.setOutsideTouchable(true);
      this.popupWindowTouzhu.setBackgroundDrawable(this.context.getResources().getDrawable(2130837536));
      this.popupWindowTouzhu.setOnDismissListener(new PopupWindow.OnDismissListener()
      {
        public void onDismiss()
        {
        }
      });
    }
    this.playStyleId = getPlayStyleId(this.mCurrentPager);
    switch (this.mCurrentPager)
    {
    default:
    case 0:
    case 1:
    case 2:
    }
    do
    {
      do
      {
        do
        {
          this.popupWindowTouzhu.showAtLocation(this.contentView, 17, 0, 0);
          return;
        }
        while ((this.ruleBaseBeansDa == null) || (this.ruleBaseBeansDa.size() == 0));
        RuleBaseBean localRuleBaseBean3;
        if (this.ruleBaseBeansDa.size() > this.daxiaoDSPosition)
          localRuleBaseBean3 = (RuleBaseBean)this.ruleBaseBeansDa.get(this.daxiaoDSPosition);
        while (true)
        {
          this.roleId = localRuleBaseBean3.getId();
          this.Odds = localRuleBaseBean3.getOdds();
          this.roleName = localRuleBaseBean3.getName();
          break;
          localRuleBaseBean3 = (RuleBaseBean)this.ruleBaseBeansDa.get(0);
          this.daxiaodanSGridViewAdapter.setSelection(0);
        }
      }
      while ((this.ruleBaseBeansCai == null) || (this.ruleBaseBeansCai.size() == 0));
      RuleBaseBean localRuleBaseBean2;
      if (this.ruleBaseBeansCai.size() > this.caishuziPosition)
        localRuleBaseBean2 = (RuleBaseBean)this.ruleBaseBeansCai.get(this.caishuziPosition);
      while (true)
      {
        this.roleId = localRuleBaseBean2.getId();
        this.Odds = localRuleBaseBean2.getOdds();
        this.roleName = localRuleBaseBean2.getName();
        break;
        localRuleBaseBean2 = (RuleBaseBean)this.ruleBaseBeansCai.get(0);
        this.caishuziGridViewAdapter.setSelection(0);
      }
    }
    while ((this.ruleBaseBeansTe == null) || (this.ruleBaseBeansTe.size() == 0));
    RuleBaseBean localRuleBaseBean1;
    if (this.ruleBaseBeansTe.size() > this.teshuWFPosition)
      localRuleBaseBean1 = (RuleBaseBean)this.ruleBaseBeansTe.get(this.teshuWFPosition);
    while (true)
    {
      this.roleId = localRuleBaseBean1.getId();
      this.Odds = localRuleBaseBean1.getOdds();
      this.roleName = localRuleBaseBean1.getName();
      break;
      localRuleBaseBean1 = (RuleBaseBean)this.ruleBaseBeansTe.get(0);
      this.teshuWanFGridViewAdapter.setSelection(0);
    }
  }

  private void touzhuAction(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt)
  {
    if (this.edit_jine != null)
      this.edit_jine.setText("");
    if (this.isKaijianging)
    {
      this.myDialog1.setMessage("已封盘，停止下注");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
      return;
    }
    if ("".equals(paramString4))
    {
      this.myDialog1.setMessage("请填写投注金额");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
      return;
    }
    try
    {
      d3 = Double.parseDouble(paramString4);
      LogUtils.e(this.TAG, "userAmount:" + this.userAmount);
      if (d3 < this.minsinglebe)
      {
        this.myDialog1.setMessage("单笔投注金额不能小于" + (int)this.minsinglebe + "元宝");
        this.myDialog1.show();
        this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymousView)
          {
            if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
              RoomPrimaryActivity.this.myDialog1.dismiss();
          }
        });
        setTouzhuBut();
        return;
      }
    }
    catch (Exception localException1)
    {
      double d3;
      setTouzhuBut();
      localException1.printStackTrace();
      int j;
      do
      {
        try
        {
          double d1 = Double.parseDouble(paramString4);
          double d2 = Double.parseDouble(this.userAmount);
          if (d1 > d2)
          {
            LogUtils.e(this.TAG, "投注金额" + d1);
            LogUtils.e(this.TAG, "用户余额" + d2);
            this.dialogyuECharge.show();
            if ((this.gentouDialog != null) && (this.gentouDialog.isShowing()))
              this.gentouDialog.dismiss();
            this.dialogyuECharge.btn_confirm.setOnClickListener(new View.OnClickListener()
            {
              public void onClick(View paramAnonymousView)
              {
                RoomPrimaryActivity.this.dialogyuECharge.dismiss();
              }
            });
            setTouzhuBut();
            return;
          }
        }
        catch (Exception localException2)
        {
          localException2.printStackTrace();
          setTouzhuBut();
          HashMap localHashMap = new HashMap();
          localHashMap.put("lotteryid", this.lotteryid);
          localHashMap.put("memberid", this.memberId);
          localHashMap.put("playid", paramInt);
          localHashMap.put("ruleid", paramString1);
          localHashMap.put("roomid", this.roomId);
          localHashMap.put("issue", this.currentIssue);
          localHashMap.put("Odds", paramString2);
          localHashMap.put("buytype", "3");
          localHashMap.put("betstr", paramString3 + "," + paramString1 + "," + paramString2 + "," + paramString4);
          localHashMap.put("money", paramString4);
          localHashMap.put("rolename", paramString3);
          this.mApiClientVolley.send(this.mDataHandler, "list_address_tag", 1, localHashMap, this, AppConstants.URL_BETTING_ORDER);
          return;
        }
        j = (int)d3;
      }
      while (j <= (int)this.singlebet);
      this.myDialog1.setMessage("单笔投注金额不能大于" + (int)this.singlebet + "元宝");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
            RoomPrimaryActivity.this.myDialog1.dismiss();
        }
      });
      setTouzhuBut();
    }
  }

  private void yanshi1sSend(final String paramString)
  {
    try
    {
      new Handler().postDelayed(new Runnable()
      {
        public void run()
        {
          RoomPrimaryActivity.this.sendTouzhuRemindMsg(paramString);
        }
      }
      , 500L);
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }

  public void connectToXmpp()
  {
    LogUtils.d(this.TAG, "xmpp第" + (1 + this.xmppConnCount) + "次重连");
    LogUtils.d(this.TAG, "连接Xmpp服务器");
    new Thread(new Runnable()
    {
      // ERROR //
      public void run()
      {
        // Byte code:
        //   0: aload_0
        //   1: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   4: aconst_null
        //   5: invokevirtual 28	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:setConnection	(Lorg/jivesoftware/smack/XMPPConnection;)V
        //   8: new 30	org/jivesoftware/smack/ConnectionConfiguration
        //   11: dup
        //   12: getstatic 34	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:HOST	Ljava/lang/String;
        //   15: sipush 5222
        //   18: ldc 36
        //   20: invokespecial 39	org/jivesoftware/smack/ConnectionConfiguration:<init>	(Ljava/lang/String;ILjava/lang/String;)V
        //   23: astore_1
        //   24: aload_1
        //   25: iconst_1
        //   26: invokevirtual 43	org/jivesoftware/smack/ConnectionConfiguration:setReconnectionAllowed	(Z)V
        //   29: new 45	org/jivesoftware/smack/XMPPConnection
        //   32: dup
        //   33: aload_1
        //   34: invokespecial 48	org/jivesoftware/smack/XMPPConnection:<init>	(Lorg/jivesoftware/smack/ConnectionConfiguration;)V
        //   37: astore_2
        //   38: aload_2
        //   39: aload_0
        //   40: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   43: getfield 52	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:connectionListener	Lorg/jivesoftware/smack/ConnectionListener;
        //   46: invokevirtual 56	org/jivesoftware/smack/XMPPConnection:addConnectionListener	(Lorg/jivesoftware/smack/ConnectionListener;)V
        //   49: aload_2
        //   50: invokevirtual 59	org/jivesoftware/smack/XMPPConnection:connect	()V
        //   53: aload_0
        //   54: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   57: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   60: new 65	java/lang/StringBuilder
        //   63: dup
        //   64: ldc 67
        //   66: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   69: aload_2
        //   70: invokevirtual 74	org/jivesoftware/smack/XMPPConnection:getHost	()Ljava/lang/String;
        //   73: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   76: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   79: invokestatic 87	com/hsc/yalebao/weight/LogUtils:i	(Ljava/lang/String;Ljava/lang/String;)V
        //   82: aload_0
        //   83: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   86: aload_2
        //   87: invokevirtual 28	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:setConnection	(Lorg/jivesoftware/smack/XMPPConnection;)V
        //   90: getstatic 93	com/hsc/yalebao/base/CustomApplication:app	Lcom/hsc/yalebao/base/CustomApplication;
        //   93: getfield 97	com/hsc/yalebao/base/CustomApplication:userBaseBean	Lcom/hsc/yalebao/model/UserBaseBean;
        //   96: invokevirtual 102	com/hsc/yalebao/model/UserBaseBean:getSource_type	()Ljava/lang/String;
        //   99: astore 6
        //   101: getstatic 93	com/hsc/yalebao/base/CustomApplication:app	Lcom/hsc/yalebao/base/CustomApplication;
        //   104: getfield 106	com/hsc/yalebao/base/CustomApplication:preferencesUtil	Lcom/hsc/yalebao/tools/SharedPreferencesUtil;
        //   107: getstatic 111	com/hsc/yalebao/http/AppConstants:WX_OPID	Ljava/lang/String;
        //   110: ldc 113
        //   112: invokevirtual 119	com/hsc/yalebao/tools/SharedPreferencesUtil:getValue	(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
        //   115: astore 7
        //   117: aload 6
        //   119: ifnull +283 -> 402
        //   122: aload 6
        //   124: ldc 121
        //   126: invokevirtual 127	java/lang/String:equals	(Ljava/lang/Object;)Z
        //   129: ifeq +187 -> 316
        //   132: aload_2
        //   133: new 65	java/lang/StringBuilder
        //   136: dup
        //   137: ldc 129
        //   139: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   142: aload 7
        //   144: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   147: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   150: ldc 131
        //   152: aload_0
        //   153: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   156: getfield 134	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:roomId	Ljava/lang/String;
        //   159: invokevirtual 138	org/jivesoftware/smack/XMPPConnection:login	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
        //   162: aload_0
        //   163: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   166: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   169: new 65	java/lang/StringBuilder
        //   172: dup
        //   173: ldc 140
        //   175: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   178: aload_2
        //   179: invokevirtual 143	org/jivesoftware/smack/XMPPConnection:getUser	()Ljava/lang/String;
        //   182: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   185: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   188: invokestatic 87	com/hsc/yalebao/weight/LogUtils:i	(Ljava/lang/String;Ljava/lang/String;)V
        //   191: aload_0
        //   192: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   195: invokevirtual 146	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:dismissLoadingDialog	()V
        //   198: aload_2
        //   199: new 148	org/jivesoftware/smack/packet/Presence
        //   202: dup
        //   203: getstatic 154	org/jivesoftware/smack/packet/Presence$Type:available	Lorg/jivesoftware/smack/packet/Presence$Type;
        //   206: invokespecial 157	org/jivesoftware/smack/packet/Presence:<init>	(Lorg/jivesoftware/smack/packet/Presence$Type;)V
        //   209: invokevirtual 161	org/jivesoftware/smack/XMPPConnection:sendPacket	(Lorg/jivesoftware/smack/packet/Packet;)V
        //   212: aload_2
        //   213: invokevirtual 165	org/jivesoftware/smack/XMPPConnection:getRoster	()Lorg/jivesoftware/smack/Roster;
        //   216: astore 8
        //   218: aload 8
        //   220: invokevirtual 171	org/jivesoftware/smack/Roster:getEntries	()Ljava/util/Collection;
        //   223: astore 9
        //   225: aload_0
        //   226: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   229: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   232: ldc 173
        //   234: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   237: aload 9
        //   239: invokeinterface 182 1 0
        //   244: astore 10
        //   246: aload 10
        //   248: invokeinterface 188 1 0
        //   253: istore 11
        //   255: iload 11
        //   257: ifne +189 -> 446
        //   260: return
        //   261: astore_3
        //   262: aload_0
        //   263: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   266: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   269: new 65	java/lang/StringBuilder
        //   272: dup
        //   273: ldc 190
        //   275: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   278: aload_2
        //   279: invokevirtual 74	org/jivesoftware/smack/XMPPConnection:getHost	()Ljava/lang/String;
        //   282: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   285: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   288: invokestatic 193	com/hsc/yalebao/weight/LogUtils:e	(Ljava/lang/String;Ljava/lang/String;)V
        //   291: aload_0
        //   292: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   295: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   298: aload_3
        //   299: invokevirtual 194	org/jivesoftware/smack/XMPPException:toString	()Ljava/lang/String;
        //   302: invokestatic 193	com/hsc/yalebao/weight/LogUtils:e	(Ljava/lang/String;Ljava/lang/String;)V
        //   305: aload_0
        //   306: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   309: aconst_null
        //   310: invokevirtual 28	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:setConnection	(Lorg/jivesoftware/smack/XMPPConnection;)V
        //   313: goto -231 -> 82
        //   316: aload_2
        //   317: aload_0
        //   318: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   321: getfield 197	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:USERNAME	Ljava/lang/String;
        //   324: aload_0
        //   325: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   328: getfield 200	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:PASSWORD	Ljava/lang/String;
        //   331: aload_0
        //   332: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   335: getfield 134	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:roomId	Ljava/lang/String;
        //   338: invokevirtual 138	org/jivesoftware/smack/XMPPConnection:login	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
        //   341: goto -179 -> 162
        //   344: astore 5
        //   346: aload_0
        //   347: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   350: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   353: new 65	java/lang/StringBuilder
        //   356: dup
        //   357: ldc 202
        //   359: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   362: aload_0
        //   363: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   366: getfield 197	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:USERNAME	Ljava/lang/String;
        //   369: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   372: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   375: invokestatic 193	com/hsc/yalebao/weight/LogUtils:e	(Ljava/lang/String;Ljava/lang/String;)V
        //   378: aload_0
        //   379: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   382: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   385: aload 5
        //   387: invokevirtual 194	org/jivesoftware/smack/XMPPException:toString	()Ljava/lang/String;
        //   390: invokestatic 193	com/hsc/yalebao/weight/LogUtils:e	(Ljava/lang/String;Ljava/lang/String;)V
        //   393: aload_0
        //   394: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   397: aconst_null
        //   398: invokevirtual 28	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:setConnection	(Lorg/jivesoftware/smack/XMPPConnection;)V
        //   401: return
        //   402: aload_2
        //   403: aload_0
        //   404: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   407: getfield 197	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:USERNAME	Ljava/lang/String;
        //   410: aload_0
        //   411: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   414: getfield 200	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:PASSWORD	Ljava/lang/String;
        //   417: aload_0
        //   418: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   421: getfield 134	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:roomId	Ljava/lang/String;
        //   424: invokevirtual 138	org/jivesoftware/smack/XMPPConnection:login	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
        //   427: goto -265 -> 162
        //   430: astore 4
        //   432: aload 4
        //   434: invokevirtual 205	java/lang/Exception:printStackTrace	()V
        //   437: aload_0
        //   438: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   441: aconst_null
        //   442: invokevirtual 28	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:setConnection	(Lorg/jivesoftware/smack/XMPPConnection;)V
        //   445: return
        //   446: aload 10
        //   448: invokeinterface 209 1 0
        //   453: checkcast 211	org/jivesoftware/smack/RosterEntry
        //   456: astore 12
        //   458: aload_0
        //   459: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   462: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   465: new 65	java/lang/StringBuilder
        //   468: dup
        //   469: ldc 213
        //   471: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   474: aload 12
        //   476: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
        //   479: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   482: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   485: aload_0
        //   486: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   489: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   492: new 65	java/lang/StringBuilder
        //   495: dup
        //   496: ldc 218
        //   498: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   501: aload 12
        //   503: invokevirtual 219	org/jivesoftware/smack/RosterEntry:getUser	()Ljava/lang/String;
        //   506: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   509: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   512: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   515: aload_0
        //   516: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   519: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   522: new 65	java/lang/StringBuilder
        //   525: dup
        //   526: ldc 221
        //   528: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   531: aload 12
        //   533: invokevirtual 224	org/jivesoftware/smack/RosterEntry:getName	()Ljava/lang/String;
        //   536: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   539: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   542: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   545: aload_0
        //   546: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   549: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   552: new 65	java/lang/StringBuilder
        //   555: dup
        //   556: ldc 226
        //   558: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   561: aload 12
        //   563: invokevirtual 230	org/jivesoftware/smack/RosterEntry:getStatus	()Lorg/jivesoftware/smack/packet/RosterPacket$ItemStatus;
        //   566: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
        //   569: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   572: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   575: aload_0
        //   576: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   579: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   582: new 65	java/lang/StringBuilder
        //   585: dup
        //   586: ldc 232
        //   588: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   591: aload 12
        //   593: invokevirtual 236	org/jivesoftware/smack/RosterEntry:getType	()Lorg/jivesoftware/smack/packet/RosterPacket$ItemType;
        //   596: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
        //   599: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   602: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   605: aload 8
        //   607: aload 12
        //   609: invokevirtual 219	org/jivesoftware/smack/RosterEntry:getUser	()Ljava/lang/String;
        //   612: invokevirtual 240	org/jivesoftware/smack/Roster:getPresence	(Ljava/lang/String;)Lorg/jivesoftware/smack/packet/Presence;
        //   615: astore 13
        //   617: aload_0
        //   618: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   621: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   624: new 65	java/lang/StringBuilder
        //   627: dup
        //   628: ldc 242
        //   630: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   633: aload 13
        //   635: invokevirtual 244	org/jivesoftware/smack/packet/Presence:getStatus	()Ljava/lang/String;
        //   638: invokevirtual 78	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   641: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   644: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   647: aload_0
        //   648: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   651: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   654: new 65	java/lang/StringBuilder
        //   657: dup
        //   658: ldc 246
        //   660: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   663: aload 13
        //   665: invokevirtual 249	org/jivesoftware/smack/packet/Presence:getType	()Lorg/jivesoftware/smack/packet/Presence$Type;
        //   668: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
        //   671: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   674: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   677: aload 13
        //   679: invokevirtual 249	org/jivesoftware/smack/packet/Presence:getType	()Lorg/jivesoftware/smack/packet/Presence$Type;
        //   682: getstatic 154	org/jivesoftware/smack/packet/Presence$Type:available	Lorg/jivesoftware/smack/packet/Presence$Type;
        //   685: if_acmpne +15 -> 700
        //   688: aload_0
        //   689: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   692: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   695: ldc 251
        //   697: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   700: aload_0
        //   701: getfield 17	com/hsc/yalebao/tabIndex/RoomPrimaryActivity$24:this$0	Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;
        //   704: invokestatic 63	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:access$10	(Lcom/hsc/yalebao/tabIndex/RoomPrimaryActivity;)Ljava/lang/String;
        //   707: new 65	java/lang/StringBuilder
        //   710: dup
        //   711: ldc 253
        //   713: invokespecial 70	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
        //   716: aload 13
        //   718: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/Object;)Ljava/lang/StringBuilder;
        //   721: invokevirtual 81	java/lang/StringBuilder:toString	()Ljava/lang/String;
        //   724: invokestatic 176	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
        //   727: goto -481 -> 246
        //
        // Exception table:
        //   from	to	target	type
        //   49	82	261	org/jivesoftware/smack/XMPPException
        //   82	117	344	org/jivesoftware/smack/XMPPException
        //   122	162	344	org/jivesoftware/smack/XMPPException
        //   162	246	344	org/jivesoftware/smack/XMPPException
        //   246	255	344	org/jivesoftware/smack/XMPPException
        //   316	341	344	org/jivesoftware/smack/XMPPException
        //   402	427	344	org/jivesoftware/smack/XMPPException
        //   446	700	344	org/jivesoftware/smack/XMPPException
        //   700	727	344	org/jivesoftware/smack/XMPPException
        //   82	117	430	java/lang/Exception
        //   122	162	430	java/lang/Exception
        //   162	246	430	java/lang/Exception
        //   246	255	430	java/lang/Exception
        //   316	341	430	java/lang/Exception
        //   402	427	430	java/lang/Exception
        //   446	700	430	java/lang/Exception
        //   700	727	430	java/lang/Exception
      }
    }).start();
  }

  public void dealNowPreData(IssueBean paramIssueBean)
  {
    if (paramIssueBean == null)
      UiUtil.showToast(this.context, "获取失败");
    label219: 
    do
    {
      IssueBaseBean localIssueBaseBean;
      do
      {
        do
        {
          return;
          if (paramIssueBean.getFlag() == -4)
          {
            activityStack.backToMain(MainActivity.class, this.context);
            return;
          }
          localIssueBaseBean = paramIssueBean.getResult();
          String str1 = paramIssueBean.getCurtime();
          LogUtils.i(this.TAG, "currentServerTime:" + str1);
          this.serverDate = DateUtil.getDateFromTimeString(str1, "yyyy-MM-dd HH:mm:ss");
          setNobibiStateByServerTime();
          String str2 = str1.substring(0, 11);
          if ("1".equals(this.lotteryid))
          {
            this.tv_game_time.setText("本游戏开售时间为09：00-23：55");
            Date localDate5 = DateUtil.getDateFromTimeString(str2 + "09:00:00", "yyyy-MM-dd HH:mm:ss");
            Date localDate6 = DateUtil.getDateFromTimeString(str2 + "23:55:00", "yyyy-MM-dd HH:mm:ss");
            this.isInDate = DateUtil.isInDate(this.serverDate, localDate5, localDate6);
            LogUtils.e(this.TAG, "lotteryid=1,isInDate:" + this.isInDate);
            if (!this.isInDate)
              break label653;
            this.tv_game_time.setVisibility(8);
            this.lin_0.setVisibility(0);
          }
          while (true)
          {
            if (paramIssueBean.getFlag() != 0)
              break label705;
            if (!"3".equals(this.lotteryid))
              break;
            Date localDate1 = DateUtil.getDateFromTimeString(str2 + paramIssueBean.getOpentime(), "yyyy-MM-dd HH:mm:ss");
            Date localDate2 = DateUtil.getDateFromTimeString(str2 + paramIssueBean.getEndtime(), "yyyy-MM-dd HH:mm:ss");
            this.isInDate = DateUtil.isInDate(this.serverDate, localDate1, localDate2);
            LogUtils.e(this.TAG, "isInDate:" + this.isInDate);
            if (!this.isInDate)
              break;
            this.tv_begin_time.setText("开售时间" + paramIssueBean.getDescription());
            this.tv_begin_time.setVisibility(0);
            this.txt_current_issue.setText("?");
            this.ll_jiezhi.setVisibility(8);
            this.txt_time_left.setText("已停售...");
            if (!this.tingshouisShowing)
              break;
            yanshi1sSend("各位老板，本游戏每天在本时间段内需要进行服务器维护，暂停销售，再次开售时间" + paramIssueBean.getDescription() + "，想继续娱乐的老板请耐心等待或到隔壁的北京 28 房间娱乐！！！");
            this.tingshouisShowing = false;
            return;
            if ("2".equals(this.lotteryid))
            {
              this.tv_game_time.setText("本游戏开售时间为00：00-09：00");
              Date localDate3 = DateUtil.getDateFromTimeString(str2 + "00:00:00", "yyyy-MM-dd HH:mm:ss");
              Date localDate4 = DateUtil.getDateFromTimeString(str2 + "23:59:59", "yyyy-MM-dd HH:mm:ss");
              this.isInDate = DateUtil.isInDate(this.serverDate, localDate3, localDate4);
              LogUtils.e(this.TAG, "lotteryid=2,isInDate:" + this.isInDate);
              break label219;
            }
            if (!"3".equals(this.lotteryid))
              break label219;
            this.isInDate = true;
            LogUtils.e(this.TAG, "lotteryid=3,isInDate:" + this.isInDate);
            break label219;
            this.tv_game_time.setVisibility(0);
            this.lin_0.setVisibility(8);
            if (("1".equals(this.lotteryid)) && (this.tingshouisShowing))
            {
              yanshi1sSend("各位老板，本游戏现处于停售时间段，想要继续娱乐的老板请到隔壁加拿大28房间娱乐！！！");
              this.tingshouisShowing = false;
            }
          }
          if (paramIssueBean.getFlag() == -2)
          {
            showDownWireDialog();
            return;
          }
          if (paramIssueBean.getFlag() == -3)
          {
            ShowFengjinDialog();
            return;
          }
        }
        while (paramIssueBean.getFlag() != 1);
        LogUtils.e(this.TAG, "issueBean.getFlag() == 1");
        if (paramIssueBean.getIssale() != 1)
          break;
        LogUtils.e(this.TAG, "issueBean.getIssale() == 1");
        if ("-1".equals(paramIssueBean.getStatus()))
        {
          LogUtils.e(this.TAG, "-1.equals(issueBean.getStatus())");
          this.txt_time_left.setText("已停售...");
          return;
        }
      }
      while (localIssueBaseBean == null);
      if (((int)this.minsinglebe == 0) || ((int)this.singlebet == 0) || ((int)this.sumbet == 0))
      {
        LogUtils.e(this.TAG, "获取房间投注限制 暂未获取到数据 getRoomRule()");
        return;
      }
      this.currentIssue = localIssueBaseBean.getIssue();
      this.txt_current_issue.setText(this.currentIssue);
      if (("1".equals(this.lotteryid)) || ("2".equals(this.lotteryid)))
      {
        this.timeLeft = (-30 + (2 + paramIssueBean.getSecond()));
        this.thirtySecond = 30;
        if (paramIssueBean.getSecond() <= 30)
          this.thirtySecond = paramIssueBean.getSecond();
        if (this.timer != null)
        {
          if (this.currentIssueTimerTask != null)
          {
            this.currentIssueTimerTask.cancel();
            LogUtils.e(this.TAG, "取消获取当前期任务：剩余时间" + this.timeLeft);
            this.currentIssueTimerTask = null;
          }
          this.currentIssueTimerTask = new CurrentIssueTimerTask();
          this.timer.scheduleAtFixedRate(this.currentIssueTimerTask, 0L, 1000L);
          LogUtils.e(this.TAG, "执行获取当前期任务：剩余时间" + this.timeLeft);
          if ((!this.isInDate) || (this.timeLeft <= 0))
            break label1168;
          String str3 = "【" + this.currentIssue + "期】单注" + (int)this.minsinglebe + "起， " + (int)this.singlebet + "封顶，总注" + (int)this.sumbet + "封顶" + "<br>★★现在可以开始下注★★";
          if (!this.touzhuisShowing)
          {
            yanshi1sSend(str3);
            this.touzhuisShowing = true;
          }
        }
      }
      while (true)
      {
        Log.d(this.TAG, "the issue last time:" + this.timeLeft);
        return;
        LogUtils.d(this.TAG, "已停售");
        continue;
        if ("3".equals(this.lotteryid))
        {
          this.timeLeft = (-15 + (2 + paramIssueBean.getSecond()));
          this.thirtySecond = 15;
          if (paramIssueBean.getSecond() <= 15)
            this.thirtySecond = paramIssueBean.getSecond();
          if (this.timer != null)
          {
            if (this.currentIssueTimerTask != null)
            {
              this.currentIssueTimerTask.cancel();
              LogUtils.e(this.TAG, "取消获取当前期任务：剩余时间" + this.timeLeft);
              this.currentIssueTimerTask = null;
            }
            this.currentIssueTimerTask = new CurrentIssueTimerTask();
            this.timer.scheduleAtFixedRate(this.currentIssueTimerTask, 0L, 1000L);
            LogUtils.e(this.TAG, "执行获取当前期任务：剩余时间" + this.timeLeft);
            if ((this.isInDate) && (this.timeLeft > 0))
            {
              String str4 = "【" + this.currentIssue + "期】单注" + (int)this.minsinglebe + "起， " + (int)this.singlebet + "封顶，总注" + (int)this.sumbet + "封顶" + "<br>★★现在可以开始下注★★";
              if (!this.jianadatouzhuisShowing)
              {
                yanshi1sSend(str4);
                this.jianadatouzhuisShowing = true;
              }
            }
          }
        }
      }
    }
    while (paramIssueBean.getIssale() != 0);
    label653: label705: this.txt_time_left.setText("维护中...");
    label1168:
  }

  public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)
  {
    if ((paramKeyEvent.getKeyCode() == 4) && (paramKeyEvent.getAction() == 0) && (paramKeyEvent.getRepeatCount() == 0))
    {
      if (this.lin_face.getVisibility() == 0)
      {
        this.lin_face.setVisibility(8);
        return true;
      }
      CustomApplication.app.finishActivity(this);
    }
    return super.dispatchKeyEvent(paramKeyEvent);
  }

  protected int[] getLocation(View paramView)
  {
    int[] arrayOfInt = new int[2];
    paramView.getLocationOnScreen(arrayOfInt);
    LogUtils.d(this.TAG, paramView.getClass().getSimpleName() + "-X:" + arrayOfInt[0]);
    LogUtils.d(this.TAG, paramView.getClass().getSimpleName() + "-Y:" + arrayOfInt[1]);
    return arrayOfInt;
  }

  public void getPlaytList()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.i(this.TAG, "获取彩种的所有玩法getPlaytList()-lotteryid:" + this.lotteryid);
    LogUtils.i(this.TAG, "URL:" + AppConstants.URL_GET_PLAYLIST);
    RequestNet.get(this.context, AppConstants.URL_GET_PLAYLIST, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getPlaytList-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "彩种所有玩法result:" + paramAnonymousString);
        if ((paramAnonymousString == null) || ("".equals(paramAnonymousString)))
        {
          LogUtils.e(RoomPrimaryActivity.this.TAG, "result:" + paramAnonymousString);
          return;
        }
        Gson localGson = new Gson();
        try
        {
          localPlayStyleBean = (PlayStyleBean)localGson.fromJson(paramAnonymousString, PlayStyleBean.class);
          RoomPrimaryActivity.this.dealpeilv(localPlayStyleBean);
          return;
        }
        catch (Exception localException)
        {
          while (true)
          {
            localException.printStackTrace();
            PlayStyleBean localPlayStyleBean = null;
          }
        }
      }
    });
  }

  protected void getPreProfitAndLoseMoney()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", this.memberId);
    localHashMap.put("lotteryid", this.lotteryid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_PREPROFIT_AND_LOSSMONEY);
    RequestNet.get(this.context, AppConstants.URL_GET_PREPROFIT_AND_LOSSMONEY, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(RoomPrimaryActivity.this.TAG, "获取失败,getUserAmount-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(RoomPrimaryActivity.this.TAG, "返奖信息result:" + paramAnonymousString);
        Gson localGson = new Gson();
        try
        {
          RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean = ((PreProfitAndLossMoneyBean)localGson.fromJson(paramAnonymousString, PreProfitAndLossMoneyBean.class));
          if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean == null)
            return;
        }
        catch (Exception localException)
        {
          do
          {
            do
            {
              while (true)
                localException.printStackTrace();
              if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.flag == -4)
              {
                RoomPrimaryActivity.activityStack.backToMain(MainActivity.class, RoomPrimaryActivity.this.context);
                return;
              }
              if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.flag == -2)
              {
                RoomPrimaryActivity.this.showDownWireDialog();
                return;
              }
              if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.flag == -3)
              {
                RoomPrimaryActivity.this.ShowFengjinDialog();
                return;
              }
            }
            while (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.flag != 1);
            if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.issue == 0)
            {
              RoomPrimaryActivity.this.iv_arrow.setVisibility(4);
              return;
            }
          }
          while (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus == 0.0D);
          if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus <= 0.0D)
            break label358;
        }
        RoomPrimaryActivity.this.iv_arrow.setEnabled(false);
        RoomPrimaryActivity.this.iv_arrow.setText(UiUtil.savePoint(RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus, 2));
        RoomPrimaryActivity.this.tv_earn_money.setText("上期赢");
        RoomPrimaryActivity.this.tv_earn_money.setTextColor(-65536);
        RoomPrimaryActivity.this.iv_arrow.setTextColor(-65536);
        LogUtils.e(RoomPrimaryActivity.this.TAG, "上期赢" + RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus);
        while (true)
        {
          RoomPrimaryActivity.this.iv_arrow.postDelayed(new Runnable()
          {
            public void run()
            {
              if ((RoomPrimaryActivity.this.preIssue != null) && (RoomPrimaryActivity.this.preIssue.equals(RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.issue)))
              {
                LogUtils.e(RoomPrimaryActivity.this.TAG, "当上一期和返回盈亏期数一样才执行动画 ");
                int[] arrayOfInt1 = RoomPrimaryActivity.this.getLocation(RoomPrimaryActivity.this.iv_arrow);
                RoomPrimaryActivity.this.arr_x = arrayOfInt1[0];
                RoomPrimaryActivity.this.arr_y = arrayOfInt1[1];
                int[] arrayOfInt2 = RoomPrimaryActivity.this.getLocation(RoomPrimaryActivity.this.tv_earn_money);
                RoomPrimaryActivity.this.start_X = arrayOfInt2[0];
                RoomPrimaryActivity.this.start_Y = arrayOfInt2[1];
                RoomPrimaryActivity.this.startAnmi(RoomPrimaryActivity.this.tv_earn_money);
                return;
              }
              RoomPrimaryActivity.this.iv_arrow.setVisibility(4);
            }
          }
          , 2000L);
          return;
          label358: if (RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus < 0.0D)
          {
            RoomPrimaryActivity.this.iv_arrow.setEnabled(true);
            RoomPrimaryActivity.this.iv_arrow.setText(UiUtil.savePoint(Math.abs(RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus), 2));
            RoomPrimaryActivity.this.tv_earn_money.setText("上期亏");
            RoomPrimaryActivity.this.tv_earn_money.setTextColor(-13060313);
            RoomPrimaryActivity.this.iv_arrow.setTextColor(-13060313);
            LogUtils.e(RoomPrimaryActivity.this.TAG, "上期亏" + Math.abs(RoomPrimaryActivity.this.mPreProfitAndLossMoneyBean.bonus));
          }
        }
      }
    });
  }

  // ERROR //
  public void isFirst()
  {
    // Byte code:
    //   0: aload_0
    //   1: invokestatic 2646	java/util/Calendar:getInstance	()Ljava/util/Calendar;
    //   4: putfield 2648	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:calendar	Ljava/util/Calendar;
    //   7: aload_0
    //   8: getfield 2648	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:calendar	Ljava/util/Calendar;
    //   11: iconst_5
    //   12: invokevirtual 2650	java/util/Calendar:get	(I)I
    //   15: istore_1
    //   16: aload_0
    //   17: aload_0
    //   18: invokestatic 2654	com/hsc/yalebao/base/MainActivity:getAppVersionCode	(Landroid/content/Context;)Ljava/lang/String;
    //   21: iconst_0
    //   22: invokevirtual 2658	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:getSharedPreferences	(Ljava/lang/String;I)Landroid/content/SharedPreferences;
    //   25: astore_2
    //   26: aload_2
    //   27: ldc_w 2660
    //   30: iconst_1
    //   31: invokeinterface 2666 3 0
    //   36: istore_3
    //   37: aload_2
    //   38: ldc_w 2668
    //   41: iconst_0
    //   42: invokeinterface 2672 3 0
    //   47: istore 4
    //   49: aload_2
    //   50: invokeinterface 2676 1 0
    //   55: astore 5
    //   57: iload_3
    //   58: ifeq +52 -> 110
    //   61: ldc_w 2678
    //   64: ldc_w 2680
    //   67: invokestatic 1074	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   70: aload 5
    //   72: ldc_w 2668
    //   75: iload_1
    //   76: invokeinterface 2686 3 0
    //   81: pop
    //   82: aload 5
    //   84: ldc_w 2660
    //   87: iconst_0
    //   88: invokeinterface 2690 3 0
    //   93: pop
    //   94: aload 5
    //   96: invokeinterface 2693 1 0
    //   101: pop
    //   102: aload_0
    //   103: ldc_w 2695
    //   106: invokevirtual 2698	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:showtishi	(Ljava/lang/String;)V
    //   109: return
    //   110: iload_1
    //   111: iload 4
    //   113: if_icmpeq +35 -> 148
    //   116: iload_1
    //   117: iconst_1
    //   118: iadd
    //   119: pop
    //   120: aload 5
    //   122: ldc_w 2668
    //   125: iload_1
    //   126: invokeinterface 2686 3 0
    //   131: pop
    //   132: aload 5
    //   134: invokeinterface 2693 1 0
    //   139: pop
    //   140: aload_0
    //   141: ldc_w 2695
    //   144: invokevirtual 2698	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:showtishi	(Ljava/lang/String;)V
    //   147: return
    //   148: ldc_w 2678
    //   151: ldc_w 2700
    //   154: invokestatic 1074	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   157: return
    //   158: astore 6
    //   160: aload 6
    //   162: invokevirtual 532	java/lang/Exception:printStackTrace	()V
    //   165: return
    //   166: astore 6
    //   168: goto -8 -> 160
    //
    // Exception table:
    //   from	to	target	type
    //   61	109	158	java/lang/Exception
    //   148	157	158	java/lang/Exception
    //   120	147	166	java/lang/Exception
  }

  // ERROR //
  public void isFirstclicktouzhu()
  {
    // Byte code:
    //   0: aload_0
    //   1: invokestatic 2646	java/util/Calendar:getInstance	()Ljava/util/Calendar;
    //   4: putfield 2648	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:calendar	Ljava/util/Calendar;
    //   7: aload_0
    //   8: getfield 2648	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:calendar	Ljava/util/Calendar;
    //   11: iconst_5
    //   12: invokevirtual 2650	java/util/Calendar:get	(I)I
    //   15: istore_1
    //   16: aload_0
    //   17: ldc_w 2703
    //   20: iconst_0
    //   21: invokevirtual 2658	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:getSharedPreferences	(Ljava/lang/String;I)Landroid/content/SharedPreferences;
    //   24: astore_2
    //   25: aload_2
    //   26: ldc_w 2660
    //   29: iconst_1
    //   30: invokeinterface 2666 3 0
    //   35: istore_3
    //   36: aload_2
    //   37: ldc_w 2668
    //   40: iconst_0
    //   41: invokeinterface 2672 3 0
    //   46: istore 4
    //   48: aload_2
    //   49: invokeinterface 2676 1 0
    //   54: astore 5
    //   56: iload_3
    //   57: ifeq +52 -> 109
    //   60: ldc_w 2678
    //   63: ldc_w 2680
    //   66: invokestatic 1074	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   69: aload 5
    //   71: ldc_w 2668
    //   74: iload_1
    //   75: invokeinterface 2686 3 0
    //   80: pop
    //   81: aload 5
    //   83: ldc_w 2660
    //   86: iconst_0
    //   87: invokeinterface 2690 3 0
    //   92: pop
    //   93: aload 5
    //   95: invokeinterface 2693 1 0
    //   100: pop
    //   101: aload_0
    //   102: ldc_w 2703
    //   105: invokevirtual 2698	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:showtishi	(Ljava/lang/String;)V
    //   108: return
    //   109: iload_1
    //   110: iconst_1
    //   111: isub
    //   112: iload 4
    //   114: if_icmpne +35 -> 149
    //   117: iload_1
    //   118: iconst_1
    //   119: iadd
    //   120: pop
    //   121: aload 5
    //   123: ldc_w 2668
    //   126: iload_1
    //   127: invokeinterface 2686 3 0
    //   132: pop
    //   133: aload 5
    //   135: invokeinterface 2693 1 0
    //   140: pop
    //   141: aload_0
    //   142: ldc_w 2703
    //   145: invokevirtual 2698	com/hsc/yalebao/tabIndex/RoomPrimaryActivity:showtishi	(Ljava/lang/String;)V
    //   148: return
    //   149: ldc_w 2678
    //   152: ldc_w 2700
    //   155: invokestatic 1074	com/hsc/yalebao/weight/LogUtils:d	(Ljava/lang/String;Ljava/lang/String;)V
    //   158: return
    //   159: astore 6
    //   161: aload 6
    //   163: invokevirtual 532	java/lang/Exception:printStackTrace	()V
    //   166: return
    //   167: astore 6
    //   169: goto -8 -> 161
    //
    // Exception table:
    //   from	to	target	type
    //   60	108	159	java/lang/Exception
    //   149	158	159	java/lang/Exception
    //   121	148	167	java/lang/Exception
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
      return;
    case 2131099947:
      getUserAmount();
      return;
    case 2131099953:
    case 2131099954:
    case 2131099956:
      showPopwindow();
      this.img_xiala.setImageDrawable(this.context.getResources().getDrawable(2130837667));
      return;
    case 2131100027:
      closeWindowSoftInput(this.edit_shuru);
      if (!this.isInDate)
      {
        this.myDialog1.setMessage("还未到投注时间哦");
        this.myDialog1.show();
        this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymousView)
          {
            if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
              RoomPrimaryActivity.this.myDialog1.dismiss();
          }
        });
        return;
      }
      if (this.isKaijianging)
      {
        this.myDialog1.setMessage("已封盘，停止下注");
        this.myDialog1.show();
        this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
        {
          public void onClick(View paramAnonymousView)
          {
            if ((RoomPrimaryActivity.this.myDialog1.isShowing()) && (RoomPrimaryActivity.this.myDialog1 != null))
              RoomPrimaryActivity.this.myDialog1.dismiss();
          }
        });
        return;
      }
      showPopwindowTouzhu();
      isFirstclicktouzhu();
      return;
    case 2131100029:
      closeWindowSoftInput(this.edit_shuru);
      setLinFaceIsVisible();
      return;
    case 2131100036:
      sendMsg();
      return;
    case 2131100034:
      initFace();
      return;
    case 2131100035:
    }
    initEmoji();
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    this.context = this;
    this.mApiClientVolley = new ApiClientVolley(this);
    this.contentView = LayoutInflater.from(this.context).inflate(2130903080, null);
    isFirst();
    this.tingshouisShowing = true;
    this.tv_begin_time = ((TextView)this.contentView.findViewById(2131099946));
    this.ll_jiezhi = ((LinearLayout)this.contentView.findViewById(2131099943));
    this.emptyView = LayoutInflater.from(this.context).inflate(2130903139, null);
    this.tv_tishi = ((TextView)this.emptyView.findViewById(2131100053));
    this.tv_tishi.setText("获取中...");
    this.viewNearlyTen = LayoutInflater.from(this.context).inflate(2130903154, null);
    this.list_kaijiang = ((ListView)this.viewNearlyTen.findViewById(2131100178));
    this.list_kaijiang.setEmptyView(this.emptyView);
    setContentView(this.contentView);
    CustomApplication.app.addActivity(this);
    Bundle localBundle = getIntent().getExtras();
    if (localBundle != null)
    {
      if (localBundle.containsKey("roomId"))
        this.roomId = localBundle.getString("roomId");
      if (localBundle.containsKey("roomName"))
        this.roomName = localBundle.getString("roomName");
      if (localBundle.containsKey("parentid"))
        this.parentid = localBundle.getString("parentid");
      if (localBundle.containsKey("lotteryid"))
        this.lotteryid = localBundle.getString("lotteryid");
      if (localBundle.containsKey("room_level"))
      {
        this.room_level = localBundle.getInt("room_level");
        this.sumbet = localBundle.getDouble("sumbet");
        this.singlebet = localBundle.getDouble("singlebet");
        this.minsinglebe = localBundle.getDouble("minsinglebe");
      }
    }
    this.USERNAME = CustomApplication.app.preferencesUtil.getValue(AppConstants.LOGIN_USERNAME, "");
    this.PASSWORD = CustomApplication.app.preferencesUtil.getValue(AppConstants.LOGIN_PWD, "");
    LogUtils.i(this.TAG, "onCreate()-roomId:" + this.roomId);
    LogUtils.i(this.TAG, "onCreate()-roomName:" + this.roomName);
    LogUtils.i(this.TAG, "onCreate()-parentid:" + this.parentid);
    LogUtils.i(this.TAG, "onCreate()-lotteryid:" + this.lotteryid);
    LogUtils.i(this.TAG, "onCreate()-room_level:" + this.room_level);
    init();
    initFace();
    if (this.roomName != null)
    {
      this.mTitles = this.roomName.split(",");
      if (this.mTitles.length > 1)
        this.tv_title.initText(this.mTitles[0], this.mTitles[1]);
      this.tv_title.setOnPreTextChangeListener(new RollView.OnPreTextChangeListener()
      {
        public void SetOnPreTextChangeListener(TextView paramAnonymousTextView)
        {
          paramAnonymousTextView.setText(RoomPrimaryActivity.this.mTitles[(RoomPrimaryActivity.this.mNumber % RoomPrimaryActivity.this.mTitles.length)]);
          RoomPrimaryActivity localRoomPrimaryActivity = RoomPrimaryActivity.this;
          localRoomPrimaryActivity.mNumber = (1 + localRoomPrimaryActivity.mNumber);
        }
      });
    }
    this.mIsRunXmpp = true;
    this.mXmppHandler.postDelayed(this.mXmppThread, this.mConnectTime);
  }

  protected void onDestroy()
  {
    super.onDestroy();
    disConnectionToXmpp();
    if (this.timer != null)
    {
      this.timer.cancel();
      this.timer = null;
    }
    if (this.currentIssueTimerTask != null)
    {
      this.currentIssueTimerTask.cancel();
      this.currentIssueTimerTask = null;
    }
    if (this.thirtySecondTimerTask != null)
    {
      this.thirtySecondTimerTask.cancel();
      this.thirtySecondTimerTask = null;
    }
    if (this.twoMinutesTimerTask != null)
    {
      this.twoMinutesTimerTask.cancel();
      this.twoMinutesTimerTask = null;
    }
    if (this.receiverNet != null)
      unregisterReceiver(this.receiverNet);
    while (true)
    {
      if (this.mXmppHandler != null)
        this.mXmppHandler.removeCallbacks(this.mXmppThread);
      this.mIsRunXmpp = false;
      return;
      LogUtils.e(this.TAG, "onDestroy(),网络监听注销失败");
    }
  }

  protected void onPause()
  {
    super.onPause();
    this.mIsRunXmpp = false;
    if (this.currentIssueTimerTask != null)
    {
      this.currentIssueTimerTask.cancel();
      LogUtils.e(this.TAG, "onPause  取消获取当前期任务：剩余时间" + this.timeLeft);
      this.currentIssueTimerTask = null;
    }
    closeWindowSoftInput(this.edit_shuru);
  }

  protected void onResume()
  {
    super.onResume();
    LogUtils.i(this.TAG, "onResume()");
    this.mIsRunXmpp = true;
    if (this.mXmppHandler != null)
      this.mXmppHandler.postDelayed(this.mXmppThread, this.mConnectTime);
    get4();
    getNearlyIssueResultList();
    getPreProfitAndLoseMoney();
    getUserNobibiState();
    if (this.isTopTen)
    {
      if (this.connection != null)
        break label125;
      connectToXmpp();
    }
    while (true)
    {
      if (this.isDebug)
        this.handlerTest.sendEmptyMessageDelayed(0, 1000L);
      if ("? + ? + ? = ?  (类型)".equals(this.txt_pre_issue_no.getText().toString().trim()))
        getNearlyIssueResultList();
      return;
      label125: if (!this.connection.isConnected())
        connectToXmpp();
    }
  }

  public void onStop()
  {
    this.mIsRunXmpp = false;
    super.onStop();
  }

  public void setConnection(XMPPConnection paramXMPPConnection)
  {
    this.connection = paramXMPPConnection;
    if (this.connection != null)
    {
      MessageTypeFilter localMessageTypeFilter = new MessageTypeFilter(Message.Type.chat);
      this.connection.addPacketListener(this.packetListener, localMessageTypeFilter);
    }
  }

  @SuppressLint({"NewApi"})
  public void setTitle(int paramInt1, int paramInt2, int paramInt3, String paramString, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    View localView = findViewById(2131099716);
    this.tv_title = ((RollView)localView.findViewById(2131099849));
    if (paramBoolean)
      localView.setVisibility(0);
    while (true)
    {
      ((TextView)localView.findViewById(2131099701)).setText(paramString);
      ((TextView)localView.findViewById(2131099700)).setVisibility(paramInt1);
      ImageView localImageView = (ImageView)localView.findViewById(2131099699);
      localImageView.setVisibility(paramInt2);
      localImageView.setOnClickListener(this.onClickListener);
      localImageView.setImageResource(paramInt3);
      ((TextView)localView.findViewById(2131099702)).setOnClickListener(this.onClickListener);
      ((ImageView)localView.findViewById(2131099703)).setVisibility(8);
      this.iv_title_right = ((ImageView)localView.findViewById(2131099704));
      this.iv_title_right.setVisibility(paramInt6);
      this.iv_title_right.setOnClickListener(this.onClickListener);
      this.iv_title_right.setImageResource(paramInt7);
      return;
      localView.setVisibility(8);
    }
  }

  @SuppressLint({"NewApi"})
  public void showPopupWindowMenu()
  {
    this.popViewRight = LayoutInflater.from(this).inflate(2130903167, null);
    if (this.popupWindow == null)
      this.popupWindow = new PopupWindow(this.popViewRight, -2, -2, true);
    TextView localTextView1 = (TextView)this.popViewRight.findViewById(2131100169);
    TextView localTextView2 = (TextView)this.popViewRight.findViewById(2131100170);
    TextView localTextView3 = (TextView)this.popViewRight.findViewById(2131100171);
    TextView localTextView4 = (TextView)this.popViewRight.findViewById(2131100174);
    View localView = this.popViewRight.findViewById(2131100221);
    LinearLayout localLinearLayout = (LinearLayout)this.popViewRight.findViewById(2131100222);
    if ((CustomApplication.app.userBaseBean != null) && ("0".equals(CustomApplication.app.userBaseBean.getIsRoomOwner())))
    {
      localView.setVisibility(8);
      localLinearLayout.setVisibility(8);
    }
    while (true)
    {
      localTextView1.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent localIntent = new Intent(RoomPrimaryActivity.this, JiResultActivity.class);
          Calendar localCalendar = Calendar.getInstance();
          localIntent.putExtra("lotteryid", RoomPrimaryActivity.this.lotteryid);
          localIntent.putExtra("type", "touzhu");
          int i = localCalendar.get(1);
          int j = localCalendar.get(2);
          int k = localCalendar.get(5);
          String str1;
          String str2;
          label144: int m;
          if (j.length() < 2)
          {
            str1 = "0" + j;
            if (k.length() >= 2)
              break label314;
            str2 = "0" + k;
            localIntent.putExtra("startdate", i + "-" + str1 + "-" + str2);
            m = j + 1;
            if (m.length() >= 2)
              break label334;
          }
          label314: label334: for (String str3 = "0" + m; ; str3 = m)
          {
            localIntent.putExtra("enddate", i + "-" + str3 + "-" + str2);
            RoomPrimaryActivity.this.startActivity(localIntent);
            RoomPrimaryActivity.this.popupWindow.dismiss();
            return;
            str1 = j;
            break;
            str2 = k;
            break label144;
          }
        }
      });
      localTextView2.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent localIntent = new Intent(RoomPrimaryActivity.this, WanFaActivity.class);
          if ("3".equals(RoomPrimaryActivity.this.lotteryid))
            localIntent.putExtra("instructionType", "2");
          while (true)
          {
            RoomPrimaryActivity.this.startActivity(localIntent);
            RoomPrimaryActivity.this.popupWindow.dismiss();
            return;
            if ("1".equals(RoomPrimaryActivity.this.lotteryid))
              localIntent.putExtra("instructionType", "1");
          }
        }
      });
      localTextView3.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Intent localIntent = new Intent(RoomPrimaryActivity.this, ZoushituActivity.class);
          localIntent.putExtra("lotteryid", RoomPrimaryActivity.this.lotteryid);
          RoomPrimaryActivity.this.startActivity(localIntent);
          RoomPrimaryActivity.this.popupWindow.dismiss();
        }
      });
      localTextView4.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.startActivity(new Intent(RoomPrimaryActivity.this, RemoveNobibiActivity.class));
          RoomPrimaryActivity.this.popupWindow.dismiss();
        }
      });
      this.popupWindow.setTouchable(true);
      this.popupWindow.setTouchInterceptor(new View.OnTouchListener()
      {
        public boolean onTouch(View paramAnonymousView, MotionEvent paramAnonymousMotionEvent)
        {
          LogUtils.i("mengdd", "onTouch : ");
          return false;
        }
      });
      this.popupWindow.setBackgroundDrawable(getResources().getDrawable(2130837536));
      this.popupWindow.showAsDropDown(this.iv_title_right, 0, 0);
      this.popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener()
      {
        public void onDismiss()
        {
          RoomPrimaryActivity.this.iv_title_right.setImageResource(2130837626);
        }
      });
      return;
      localView.setVisibility(0);
      localLinearLayout.setVisibility(0);
    }
  }

  public void showtishi(String paramString)
  {
    this.windowManager = getWindowManager();
    this.img = new ImageView(this);
    this.img.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
    this.img.setScaleType(ImageView.ScaleType.FIT_XY);
    if ("touzhu".equals(paramString))
      this.img.setImageResource(2130837918);
    while (true)
    {
      WindowManager.LayoutParams localLayoutParams = new WindowManager.LayoutParams();
      localLayoutParams.type = 99;
      localLayoutParams.format = 1;
      localLayoutParams.gravity = 51;
      localLayoutParams.width = Utility.getScreenWidth(this);
      localLayoutParams.height = Utility.getScreenWidthHeight(this);
      this.windowManager.addView(this.img, localLayoutParams);
      this.img.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          RoomPrimaryActivity.this.windowManager.removeView(RoomPrimaryActivity.this.img);
        }
      });
      return;
      this.img.setImageResource(2130837666);
    }
  }

  protected void startAnmi(TextView paramTextView)
  {
    if (this.isAnimRunning)
      return;
    float f1 = this.arr_x - this.start_X;
    float f2 = this.arr_y - this.start_Y;
    LogUtils.d(this.TAG, "位移距离:from x=" + this.start_X + "to" + f1 + ",from y=" + this.start_Y + "to" + f2);
    TranslateAnimation localTranslateAnimation = new TranslateAnimation(1, -0.5F, 0, f1 - 10.0F, 1, 0.0F, 0, f2 - 10.0F);
    localTranslateAnimation.setDuration(2000L);
    localTranslateAnimation.setRepeatMode(1);
    AlphaAnimation localAlphaAnimation = new AlphaAnimation(1.0F, 0.0F);
    localAlphaAnimation.setDuration(2000L);
    localAlphaAnimation.setRepeatMode(1);
    ScaleAnimation localScaleAnimation = new ScaleAnimation(2.5F, 0.2F, 2.5F, 0.2F);
    localScaleAnimation.setDuration(2000L);
    localScaleAnimation.setRepeatMode(1);
    AnimationSet localAnimationSet = new AnimationSet(false);
    localAnimationSet.addAnimation(localScaleAnimation);
    localAnimationSet.addAnimation(localAlphaAnimation);
    localAnimationSet.addAnimation(localTranslateAnimation);
    localAnimationSet.setFillEnabled(true);
    localAnimationSet.setFillAfter(true);
    localAnimationSet.setAnimationListener(new Animation.AnimationListener()
    {
      public void onAnimationEnd(Animation paramAnonymousAnimation)
      {
        RoomPrimaryActivity.this.iv_arrow.postDelayed(new Runnable()
        {
          public void run()
          {
            RoomPrimaryActivity.this.iv_arrow.setVisibility(0);
            RoomPrimaryActivity.this.isAnimRunning = false;
          }
        }
        , 300L);
      }

      public void onAnimationRepeat(Animation paramAnonymousAnimation)
      {
      }

      public void onAnimationStart(Animation paramAnonymousAnimation)
      {
        RoomPrimaryActivity.this.isAnimRunning = true;
      }
    });
    paramTextView.startAnimation(localAnimationSet);
  }

  public void updateChatListIcon()
  {
    if ((this.list_group_chat != null) && (this.groupchatMsgViewAdpater != null))
      this.list_group_chat.post(new Runnable()
      {
        public void run()
        {
          RoomPrimaryActivity.this.groupchatMsgViewAdpater.notifyDataSetChanged();
        }
      });
  }

  class CurrentIssueTimerTask extends TimerTask
  {
    CurrentIssueTimerTask()
    {
    }

    public void run()
    {
      RoomPrimaryActivity.this.handlerCurrentIssue.sendEmptyMessage(0);
    }
  }

  private class EmojiPagerAdapter extends FragmentPagerAdapter
  {
    public EmojiPagerAdapter(FragmentManager arg2)
    {
      super();
    }

    public int getCount()
    {
      if (RoomPrimaryActivity.this.emojifragments == null)
        return 0;
      return RoomPrimaryActivity.this.emojifragments.size();
    }

    public Fragment getItem(int paramInt)
    {
      return (Fragment)RoomPrimaryActivity.this.emojifragments.get(paramInt);
    }

    public int getItemPosition(Object paramObject)
    {
      return -2;
    }
  }

  public class MyReceiver extends BroadcastReceiver
  {
    public MyReceiver()
    {
    }

    public void onReceive(Context paramContext, Intent paramIntent)
    {
      if (paramIntent.getAction().equals("android.net.conn.CONNECTIVITY_CHANGE"))
      {
        if ((!SystemHelper.isConnected(paramContext)) || (SystemHelper.getNetworkType(paramContext) == -1))
          break label99;
        CustomApplication.app.isNetConnect = true;
        SystemHelper.getNetworkType(RoomPrimaryActivity.this.getApplicationContext());
        SystemHelper.getNetworkType(RoomPrimaryActivity.this.getApplicationContext());
        LogUtils.i(RoomPrimaryActivity.this.TAG, "网络连接正常");
        if ((RoomPrimaryActivity.this.connection != null) && (!RoomPrimaryActivity.this.connection.isConnected()))
          RoomPrimaryActivity.this.connectToXmpp();
      }
      return;
      label99: CustomApplication.app.isNetConnect = false;
    }
  }

  class ThirtySecondTimerTask extends TimerTask
  {
    ThirtySecondTimerTask()
    {
    }

    public void run()
    {
      RoomPrimaryActivity.this.handler30Second.sendEmptyMessage(0);
    }
  }

  class TwoMinutesTimerTask extends TimerTask
  {
    TwoMinutesTimerTask()
    {
    }

    public void run()
    {
      RoomPrimaryActivity.this.handler120Second.sendEmptyMessage(0);
    }
  }

  private class ViewPagerAdapter extends FragmentPagerAdapter
  {
    public ViewPagerAdapter(FragmentManager arg2)
    {
      super();
    }

    public int getCount()
    {
      if (RoomPrimaryActivity.this.fragments == null)
        return 0;
      return RoomPrimaryActivity.this.fragments.size();
    }

    public Fragment getItem(int paramInt)
    {
      return (Fragment)RoomPrimaryActivity.this.fragments.get(paramInt);
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.tabIndex.RoomPrimaryActivity
 * JD-Core Version:    0.6.2
 */